>백엔드 개발 >PHP 튜토리얼 >PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法,warningphpinfo_PHP教程

PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法,warningphpinfo_PHP教程

WBOY
WBOY원래의
2016-07-13 10:11:281010검색

PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法,warningphpinfo

本文实例讲述了PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法。分享给大家供大家参考。具体分析如下:

今天在一朋友服务器测试一个网站时发现我在测试phpinfo时碰到PHP Warning:phpinfo() has been disabled for security reasons 提示了,按话的意思我总结了解决办法,下面我们一起来看看吧.

在运行phpinfo时碰到提示如下:PHP Warning: phpinfo() has been disabled for security reasons in XX.php on line XX

这段话的意思是告诉我们由于安全考虑 phpinfo() 函数被禁用,如果你有服务器管理权限请修改 php.ini 配置文件参数并重启apache 重新启用.

打开php安装路径打开php.ini文件,具体实例:在php.ini中存在 disable_functions配置,默认配置中,cli执行函数都是被禁止的,如果需要的话,需要在php.ini中将 disable_functions = phpinfo,exec , popen, system ….,将你需要执行的函数从列表中删掉再重启apache即可.

完全是配置的问题,linux中解决方法为编辑PHP配置文件:

vi /usr/local/php/etc/php.ini

寻找disable_functions字符串,将后面的scandir删除,提示:vi下可输入/,进入搜索模式,轻松找到disable_functions.

重启PHP生效:

复制代码 代码如下:
/etc/init.d/php-fpm restart

希望本文所述对大家的php程序设计有所帮助。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/929095.htmlTechArticlePHP提示Warning:phpinfo() has been disabled函数禁用的解决方法,warningphpinfo 本文实例讲述了PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法。...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.