Apache 支持PHP

WBOY
WBOYOriginal
2016-06-23 13:37:201091browse

①加载PHP模块到Apache中:

LoadModule php5_module "d:\php5\php5apache2_2.dll"

 

②加入识别扩展名为.php文件(也可以自定义扩展名)

AddType application/x-httpd-php .php

 

主页设置

DirectoryIndex index.html index.php 

 

④默认PHP目录设置

DocumentRoot "C:/www”

 

识别 php.ini 配置文件的位置:

PHPIniDir “php根目录路径" 

PHPINiDir "php.ini路径”

 

第二第三步:

     AddType application/x-httpd-php .php

     AddType application/x-httpd-php-source .phps

 

    

          DirectoryIndex index.html index.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