doc:%PHP_HOME%\install.txt
一、将php集成到apache
php安装路径: D:\apps\php-5.3.24-Win32-VC9-x86
apache安装路径: D:\apps\Apache2.2
站点文件路径:D:\www
(1)修改apache配置文件
httpd.conf最后面添加:
179 DocumentRoot "D:/www"
206 <Directory "D:/www">
#去掉Indexes
219 Options FollowSymLinks
LoadModule php5_module "D:/apps/php-5.3.24-Win32-VC9-x86/php5apache2_2.dll"
PHPIniDir "D:/apps/php-5.3.24-Win32-VC9-x86"
#可定义多个后缀,空格隔开,apache接收到该后缀的url时交给PHP处理
AddType application/x-httpd-php .php
最简单的环境配置完成,编辑一个php测试环境
<!-- index.php -->
<?php phpinfo(); ?>
访问:http://localhost/index.php
(2)php.ini
php目录下,复制php.ini-development到php.ini;
#配置时区 1008 date.timezone = Asia/Shanghai
上一步中,并没有创建该配置文件,php仍能正常工作;php应该会是采用php.ini-development中的default值(初学猜测)