项目中用file_get_contents来获取数据,出现错误提示PHP Warning: file_get_contents failed to open stream: No such file or directory
PHP日志文件显示
file_put_contents: failed to open stream: No such file or directory | {file_path}\classes\xxx.class.php | 363
或者在apache/nginx等服务器日志中显示
"PHP Warning: error_log(error_log.php): failed to open stream: Permission denied in {file_path}\libs\func.php on line 537
解决方法:修改php.ini文件
allow_url_fopen = Off
allow_url_include = Off
都改成
allow_url_fopen = On
allow_url_include = On
重启Apache/Nginx等web服务即可