步骤1:检查返回码:
if($content === FALSE) { // handle error here... }步骤2:通过在调用 _file_get_contents()的_前面放置一个错误控制运算符(即
@)来抑制警告:
__
$content = @file_get_contents($site);

步骤1:检查返回码:
if($content === FALSE) { // handle error here... }步骤2:通过在调用 _file_get_contents()的_前面放置一个错误控制运算符(即
@)来抑制警告:
$content = @file_get_contents($site);