search
Homephp教程php手册PHP4在Windows2000下的安装

PHP4在Windows2000下的安装

Jun 13, 2016 pm 12:38 PM
DownexistInstallarticleyesofPurpose

这篇文章的目的是告诉你在Win2000 Professional下如何将PHP4配置到你的IIS5中。我用的是Windows2000 Professional英文版、IIS5英文版和PHP4.0.4-Win32 Binaries,可以从PHP的官方站点www.php.net下载。注意别下载错了,那个PHP4.0.4 Release Candidate 1 Source是为Unix用户准备的,你需要的是PHP 4.0.4 Release Candidate1 Binaries for Win32。
  注意,首先你要安装IIS5,因为Win2000 Professional默认安装时把它给忘了。IIS5的安装方法在这里就不用讨论了吧,如果有问题请参考别的资料。
  OK!
  第一步,解开PHP4.0.4-Win32.ZIP压缩包,你可以把它放在C:PHP4下面。
  第二步,把C:PHP4下面的php.ini-dist文件复制到WINNT目录下,并改名成php.ini。你不需要修改任何参数就可以运行,当然根据不同情况你可以自行修改某些参数。
  第三步,把C:PHP4php4ts.dll复制到C:WINNTsystem32目录下。
  第四步,点start->programs->adminstrative tools->internet service manager
  第五步,在计算机管理窗口上展开“服务和应用程序”/“Internet信息服务”,在“默认Web站点”上点鼠标右键,选属性,这时系统弹出“默认Web站点属性”窗口
  第六步,在“默认Web站点属性”窗口上点取“ISAPI筛选器”标签,点击“添加”按钮,在弹出的“筛选器属性”窗口的“筛选器名称”中输入“PHP”,“可执行文件”中输入“C:PHP4sapiphp4isapi.dll”,确定。
  第七步,在“默认Web站点属性”窗口上点取“主目录”标签,点“配置”按钮,在弹出的“应用程序配置”窗口中点取“添加”按钮,在弹出的“添加/编辑应用程序扩展名映像”对话框中的“可执行文件”文本框中输入“C:PHP4sapiphp4isapi.dll”,“扩展名”文本框中输入“.php”(注意一定要有那个点),确定。
  第八步,回到命令行窗口,输入“net stop iisadmin”命令,终止IIS服务。系统会问你是否要将相关的服务也停止,答是。
  重新启动IIS服务。
OK,你的配置到此已经结束了,下面让我们写一个PHP程序,试验一下配置是否成功!编辑一个文件,名字为hello.php,内容为:
echo "Hello,World!";
?>
把这个文件保存在默认Web节点的默认文文件目录下(C:Inetpubwwwroot),然后打开浏览器,在地址栏中输入localhost/hello.php,如果顺利,经典的“Hello,World!”应该出现在你的浏览器中。如果找不到页面,而你也能确认上述几步都没问题,那么在浏览器的地址栏中输入地址127.0.0.1/hello.php试试看,如果能成功,则说明你的hosts文件有问题,请编辑C:WINNTsystem32driversetc下面的hosts文件,加入“127.0.0.1 localhost”一行。
好啦,开始你的PHP之旅吧!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.