久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php curl 不等待返回的實(shí)現(xiàn)方法

      在php中可以通過在使用CURL時(shí)設(shè)置“CUROPT_TIMEOUT”為1的方式來實(shí)現(xiàn)php curl觸發(fā)不等待返回即可。

      php curl 不等待返回的實(shí)現(xiàn)方法

      推薦:《PHP視頻教程》

      php 觸發(fā)腳本不等待返回的方法之curl

      如果希望php訪問一下網(wǎng)址,但不需要返回結(jié)果,如:需要執(zhí)行很長時(shí)間的頁面,不用等待返回結(jié)果,只需要執(zhí)行了就可以了,辦法之一:

      使用CURL需要設(shè)置CUROPT_TIMEOUT為1(最小為1)。也就是說,客戶端至少必須等待1秒鐘。

      public function set_cache_log(){         $host = "https://****.com.cn/index.php?s=/moudle/controller/function/id/12";         $ch = curl_init();         curl_setopt($ch, CURLOPT_URL, $host);         curl_setopt($ch, CURLOPT_HEADER, 0);         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);         curl_setopt($ch, CURLOPT_TIMEOUT, 1);         $content=curl_exec($ch);         curl_close($ch);     }

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)