// 防超時的file_get_contents改造函數
public function _fileGetContents($url)
{
$context=stream_context_create(array(
'http'=>array(
'timeout'=>30
)
));// 超時時間,單位為秒
return file_get_contents($url,0,$context);
}
// 防超時的file_get_contents改造函數
public function _fileGetContents($url)
{
$context=stream_context_create(array(
'http'=>array(
'timeout'=>30
)
));// 超時時間,單位為秒
return file_get_contents($url,0,$context);
}