Heim  >  Artikel  >  Backend-Entwicklung  >  PHP和Apache环境搭建小记_PHP教程

PHP和Apache环境搭建小记_PHP教程

WBOY
WBOYOriginal
2016-07-14 10:10:38959Durchsuche

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 安装路径

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/477461.htmlTechArticleApache 设置的时候 PHPIniDir 有什么作用? Apache 设置的时候 PHPIniDir 有什么作用? 与php4搜索php.ini是在%SystemRoot%下不同的是,PHP5按照以下顺序...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn