ll234012526 发表于 2015-11-17 12:18:57

apache整合php5

  一.配置php5
  1.找到php根目录,将php.ini-development 文件重命名为 php.ini
  2.找到配置文件下,extension_dir 将其配置为extension_dir = "d:/php5/ext"
  3.找到extension=xxx.dll,将以下扩展打开
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_odbc.dll
extension=php_dba.dll
extension=php_dbase.dll
extension=php_mbstring.dll
  4.支持session
session.save_path = "e:/temp"

  5.上传文件目录配置(选配)
upload_tmp_dir ="e:/temp"
  6.时区配置(选配)
date.timezone =Asia/Shanghai



  二.配置apache(整合php5)
  打开apache配置文件(Apache\conf目录里下,httpd.conf),
1.在文件的末尾添加对php5的支持,一定是文件的末尾。
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
PHPIniDir "C:/Program Files/PHP"
AddType application/x-httpd-php .php .html .htm
  2.添加对index.php的支持
<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

3.修改web根目录(实际工作的目录)(选择修改)
DocumentRoot &quot;D:/servers/Apache2.2/htdocs->自定义&quot;
<Directory &quot;D:/servers/Apache2.2/htdocs&quot;->自定义>
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    allow from all
</Directory>
         版权声明:本文为博主原创文章,未经博主允许不得转载。
页: [1]
查看完整版本: apache整合php5