因为LNMP 0.9禁用了部分存在危险的PHP函数,其中包含了scandir(),出现的情况就是
Warning: scandir() has been disabled for security reasons in /home/wwwroot/yourdomain.com/wp-includes/class-wp-theme.php on line 978
Warning: Invalid argument supplied for foreach() in /home/wwwroot/yourdomain.com/wp-includes/class-wp-theme.php on line 981
我们去编辑下php.ini文件即可:vi /usr/local/php/etc/php.ini;寻找disable_functions字符串,将后面的scandir删除掉。
重启PHP即可解决:/etc/init.d/php-fpm restart
本网站部分素材来源网络,如有侵犯,请联系删除!作者:wesipy,如若转载,请注明出处:http://www.kpxlt.com/archives/440