解决Warning: scandir() has been disabled for security reasons in…的问题
如果nigx服务器出现下面问题解决办法Warning: [b]scandir[/b]() has been disabled for security reasons in /home/wwwroot/…Warning: Invalid argument supplied for foreach() in /home/wwwroot/…错误。开始以为是文件权限问题,检查下来结果发现不是,改了权限没有生效,后来打开探针,发现原来是因为php里面的scandir函数被禁用了。解决办法:编辑php.ini,找到这行:disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen去掉scandir保存并重起php-fpm即可。同样,如果是Warning: [color=#ff0000]exec()[/color] has been disabled for security reasons in /home/wwwroot/…或者红色部分为其它函数,解决办法也是一样的。