Home > Backend Development > PHP Tutorial > Apache 支持PHP

Apache 支持PHP

WBOY
Release: 2016-06-23 13:37:20
Original
1102 people have browsed it

①加载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

    

 

 

 

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template