通过的.htaccess禁用PHP函数 [英] Disable php functions via .htaccess

查看:338
本文介绍了通过的.htaccess禁用PHP函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想只有在一个特定的文件夹中禁用一些PHP函数,我想用的htaccess的:

I want to disable few php functions only in a specific folder, I thought of using htaccess:

例如我曾尝试加入这一行:

For example I have tried adding this line:

php_admin_value disable_functions选项系统等。

php_admin_value disable_functions "system, etc.."

但它不工作,我只是得到500错误,如果你知道如何使它的工作,请大家分享。

However it doesn't work, I just get 500 error, if you know how to make it work, please share.

鸭preciate关于这个问题的任何帮助。

Appreciate any help on this subject.

- 编辑 -

我已经把我的Litespeed,现在有没有更多的错误,但系统()仍然是允许的,我希望把它关掉了我的服务器的主文件夹。

I have turned on my litespeed and now there are no more errors, but system() is still allowed, I want to turn it off for my server's home folder.

任何解决方案?

推荐答案

http://www.php.net/manual/en/ini.core.php#ini.disable-functions

该指令允许你禁用某些功能安全   的原因。它发生在一个逗号分隔的函数名列表。   disable_functions选项不受安全模式。

This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode.

只有内部功能都可以使用这个指令被禁用。   用户定义的函数不会受到影响。

Only internal functions can be disabled using this directive. User-defined functions are unaffected.

此指令必须在php.ini中。例如设置,不能设置在httpd.conf。

这篇关于通过的.htaccess禁用PHP函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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