场景:
服务器根据用户输入生成网址。
通过 file_get_contents 抓取网址。
网页有可能不存在。
这种情况发生挺频繁,导致error_log出现很多PHP Warning: file_get_contents(xxxxxxxxxxxxxx): failed to open stream: HTTP request failed!
请问应该怎么做能够让这种错误不出现在error_log里呢?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
@ 完事了,再加上判断逻辑