织梦问题:PHP Warning: chmod() has been disabled for security reasons

织梦问题:

PHP Warning: chmod() has been disabled for security reasons  *** /include/helpers/file.helper.php on line 126

解决办法:

方法1:开启PHP函数chown设置,如果是虚拟主机可通过主机PHP高级环境设置,如图阿里云主机设置

方法2:找到php.iniphp.ini文件所在位置。

默认安装位置C:/windows/php.ini,通过文本文档打开php.ini,找到chmod函数。进行删除。

如:disable_functions =exec,passthru,system,popen,pclose,shell_exec,proc_open,dl,chmod,gzinflate

修改成:disable_functions =exec,passthru,system,popen,pclose,shell_exec,proc_open,dl,gzinflate,并重启IIS或者服务器。

方法3:排查include文件夹是否禁止了脚本执行权限。include只需要设置禁止写入,应允许脚本执行。