在IIS 7.5的web.config中设置php.ini变量 [英] Setting php.ini variables inside web.config on IIS 7.5
本文介绍了在IIS 7.5的web.config中设置php.ini变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用web.config文件在IIS 7.5服务器上设置常用的php.ini变量?我想设置short_open_tag和环境变量.
Is there any way to set the usual php.ini variables on an IIS 7.5 server, using web.config files? I'd like to set short_open_tag and environment variables.
推荐答案
<fastCgi>
<application fullPath="C:\PHP\php-cgi.exe">
<environmentVariables>
<environmentVariable name="PHPRC" value="C:\WebSites\website1" />
</environmentVariables>
</application>
<application fullPath="C:\PHP\php-cgi.exe">
<environmentVariables>
<environmentVariable name="PHPRC" value="C:\WebSites\website2" />
</environmentVariables>
</application>
</fastCgi>
或作为 http ://ruslany.net/2009/07/per-site-php-configuration-with-php-5-3-and-iis/说,将user_ini.filename = .user.ini
添加到php.ini中并删除.user.ini
网站根目录中的文件.
Or as http://ruslany.net/2009/07/per-site-php-configuration-with-php-5-3-and-iis/ says, add user_ini.filename = .user.ini
to php.ini and drop .user.ini
files in the root of the sites.
这篇关于在IIS 7.5的web.config中设置php.ini变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文