您当前的位置:首页 > 计算机 > 服务器 > 万维网站 > 中间件

如何设置PHP函数禁用

时间:08-02来源:作者:点击数:

1.修改php.ini文件:

ignore_user_abort= On(注意前面的;号要删除)

2.默认为 ;disable_functions //将前面的 ;注释去除

改为disable_functions=exec,system,passthru,popen,pclose,shell_exec,proc_open,dl,chmod,escapeshellarg,

escapeshellcmd,sh2_exec,proc_terminate,proc_close

或者disable_functions=exec,system,passthru,popen,pclose,shell_exec,proc_open,curl_exec,multi_exec,dl,

chmod,gzinflate,stream_socket_server,popepassthru,pfsockopen,set_time_limit

fsockopen如果这个函数也禁止,就影响淘宝淘客之类远程API调用的网站无法正常调用数据了。

若需删除对应函数,去除对应函数即可。

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门