Home > php教程 > php手册 > PHP和Apache环境搭建小记

PHP和Apache环境搭建小记

WBOY
Release: 2016-06-13 10:56:56
Original
1603 people have browsed it

Apache 设置的时候 PHPIniDir 有什么作用?
Apache 设置的时候 PHPIniDir 有什么作用?
与php4搜索php.ini是在%SystemRoot%下不同的是,PHP5按照以下顺序依次查找PHP.ini:

* PHPIniDir (Apache 2 module only)
* 注册表键值:HKEY_LOCAL_MACHINE—SOFTWARE—PHPIniFilePath
* 环境变量:%PHPRC%
* PHP5的目录 (for CLI), 或者web服务器目录(for SAPI modules)
* Windows目录(C:\windows or C:\winnt)
所以如果是Apache + PHP5的话可以使用 PHPIniDir 指定php5的配置文件php.ini的路径。

如在httpd.conf:
#以apache的模块方式运行php
LoadModule php4_module /apache/php/sapi/php4apache.dll
PHPINIDir /apache/php/php.ini 


要在这里改写你的PHP 安装路径

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template