| 
 成长值: 192
 签到天数: 5050 天 [LV.Master]伴坛终老 | 
 
 发表于 2018/2/17 00:32
|
显示全部楼层
|阅读模式
|  Google Chrome 64.0.3282.167|  Windows 10 
 
| 我们来解决这个的防护方法就是 设置php-templete.ini文件,找到disable_functions,在=号后面加入一些函数禁用列表,即可解决此问题,并且他会忽略你目前是否使用了php安全模式强制开启禁用。
 
 复制代码; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.disable-functions
disable_functions =
最下方的disable_functions改成这样然后保存ini文件并且重启web即可
 
 复制代码disable_functions = chmod,closedir,copy,dir,escapeshellarg,escapeshellcmd,exec,fclose,fileperms,fopen,fread,fwrite,is_dir,link,mkdir,opendir,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,readdir,rename,rmdir,shell_exec,system,tempnam,touch,unlink
 函数禁用列表参考官方进行写的:http://php.net/manual/zh/ref.exec.php
 
 
 如果你想打开php安全模式可以这样打开,在php.ini中插入一行
 
 或者程序中加入
 
 复制代码ini_set("safe_mode",true); 
安全模式官方介绍:http://php.net/manual/zh/features.safe-mode.functions.php
 
 
 | 
 |