编辑.htaccess以加载php扩展名? [英] edit .htaccess to load php extension?

查看:77
本文介绍了编辑.htaccess以加载php扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照这篇文章在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放在同一文件夹中(有时它只是工作-如果安装了suphpphpsuexec).

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆