运行项目报错 报scandir() has been disabled for security reasons

从github下载三方扩展后直接拖拽至vendor目录
运行项目报错 报scandir() has been disabled for security reasons

 

 

 

原因:
因为PHP里面的scandir函数被禁用了


打开php.ini

disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,

proc_get_statu,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,

readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen


解决:
去掉scandir保存并重起php-fpm即可。

很多函数问题,都有可能是php禁用了,大家需要的时候去掉就可以了,为了安全尽量少开启!

 

by:ph

posted @ 2020-05-30 09:47  WidgetBox  阅读(264)  评论(0编辑  收藏  举报