编辑.htaccess以加载php扩展名? [英] edit .htaccess to load php extension?
问题描述
我按照这篇文章在apache服务器上启用PHP5 XSL扩展: .htaccess代替php.ini
I follow this post to enable PHP5 XSL extension on apache server: .htaccess instead of php.ini
php_extension xsl.so
添加上面的行后,它显示500内部服务器错误.并推荐?
After added the line above, it show the 500 internal server error. and recommend?
推荐答案
仅当PHP作为模块安装并作为模块的一部分加载时,Apache才会在.htaccess
文件中接受PHP设置.如果将PHP设置为CGI,那么您将不走运-这将无法正常工作.
Apache accepts PHP settings inside .htaccess
files only if PHP is installed as a module and thus loaded as part of it. If PHP is set up as CGI you're out of luck - this won't work.
如果您不能直接编辑php.ini
,请尝试将php.ini与.htaccess
放在同一文件夹中(有时它只是工作-如果安装了suphp
或phpsuexec
).
If you can't directly edit the php.ini
try putting a php.ini in the same folder as the .htaccess
(sometimes it just works - if there's suphp
or phpsuexec
installed).
您可以尝试的另一种方法是 dl().
Another thing you can try is dl().
这篇关于编辑.htaccess以加载php扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!