阅读背景:

file_get_contents 超时导致cpu 100%的解决方案

来源:互联网 
<?php  
$ctx = stream_context_create(array(  
   'http' => array(  
       'timeout' => 1 //设置一个超时时间,单位为秒  
       )  
   )  
);  
file_get_contents("https://example.com/", 0, $ctx);  
?> 
<?php  
$ctx = stream_conte



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: