php.ini禁用方法:1、找到并打开php.ini配置文件;2、找到“disable_functions”选项,并通过该选项关闭一些危险的函数即可。

本文操作环境:Windows7系统,PHP7.1版,Dell G3电脑。
php.ini 怎么禁用方法?
禁用PHP函数,可以对php.ini进行配置
php.ini 里有个 disable_functions 开关选项,此选项可关闭一些危险的函数,比如system,exec 等。
立即学习“PHP免费学习笔记(深入)”;
比如: disable_functions = phpinfo , 如果在文件中调用 phpinfo() 函数,那么在 error_reporting 开启的情况下,会提示如下错误:
Warning: phpinfo() has been disabled for security reasons
屏蔽函数实例:
disable_functions= phpinfo,dl, exec, system
推荐学习:《PHP视频教程》
以上就是php.ini 怎么禁用方法的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号