一、下载apache_2.2.8-win32-x86-no_ssl (1).msi、php-5.2.5-Win32.zip。链接:
二、创建如下目录:注意不要空格
F:\apache
三、安装apache到。安装完成后在浏览器输入127.0.01, 提示it works说明安装成功。注意安装前必须卸载iis
F:\apache\Apache2.2
四、解压php到
F:\apache\php
五、将F:\apache\php\php.ini-dist 重命名为 F:\apache\php\php.ini
六、打开F:\apache\php\php.ini。找到字符串:extension=php_gd2.dll所在行(611行),去掉行首的分号,在接下来的几行里,找到下表中列出的模块所在行,同样去掉前面的分号。
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
extension=php_mysql.dll
七、将F:\apache\php和F:\apache\php\ext加入系统环境变量
八、在F:\apache\Apache2.2\htdocs下创建一个first.php文件。文件内容如下
Hello World'; ?>
九、在浏览器输入http://127.0.0.1/first.php。发现显示的是html源代码。所以打开F:\apache\Apache2.2\conf\httpd.conf.
在125行(找到这两句#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so 在这两句先加入下面两句话)
1.
LoadModule php5_module "F:/apache/php/php5apache2_2.dll"
PHPIniDir "F:/apache/php/"
2.在383行添加一行
AddType application/x-httpd-php .php
十、重启php服务器。在浏览器输入http://127.0.0.1/first.php。出现helloWorld。即成功

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools
