YamPiz Servies
       
       
      Share
       
      Blog /

      PHP 程式備忘錄

      Previous
      Next
      Context
      PHP 程式備忘錄

      allow_call_time_pass_reference 誤會大了

      一直因為 5.3 後無法使用傳址的方式,所以不敢升級,實在是有太多程式用了傳址,後來發現是我誤解了,原來還是可以用的,只是不能在呼叫端指定傳址而已,比如 $a = abc(&$var); 是不允許的,但在函式裡還是可以設定傳址的如 function (&$var){} 。

      CURL 在 Linux下會很慢

      每次請求都要等待約15秒後才有結果出來,但wget 的速度很快,windows 下也很快,排除了網速慢的原因。研究的原因很可能是電信DNS解析或者是路由器的問題。或是 IPV6 支援的問題,所以在使用原來 IPV4 的條件下可以使用這個方法來提昇速度:

      程式項目名稱
      1. /* 原始程式碼 */
      2. curl_setopt(curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);

      測試方法:在終端輸入 time curl -4 http://www.heyxu.com

      • This is a declared original article, to respect the copyright, please do not repost this article without the consent of the author.
      • Keywords : 問題(2), 原因(2), 電信DNS解析(1), 速度(1), 路由器(1), 請求(1), 誤解(1), 誤會大(1), 網速慢(1), 終端輸入(1), 程式用(1), 程式(1), 研究(1), 目名稱(1), 測試方法(1), 方式(1), 排除(1), 後來發現(1), 可以用(1), 原始程式碼(1)
      0 0
      2012-05-10T19:05:00+0000

      Comment
       
      Verify

      Facebook Page

      Blog Directory

      • 魚戀秋波 Neil Y.K.'s Blog
        • 心情‧日記
        • Creation
        • My Jobs
          • 電腦維修
          • 商業美工
          • 接案工程
          • 備忘錄
            • Windows 7 免重裝切換 AHCI 模式
            • CentOS 筆記
            • Win7 備忘錄
            • 清除系統垃圾
            • Mysql 備忘錄
            • CSS 陰影效果
            • JScript 備忘錄
            • CSS 設計備忘錄
            • PHP 程式備忘錄
            • Linux shell 筆記
            • Apache 架設備忘錄
            • CSS Selector 種類簡介
          • 黑族
        • Misc DIY
        • Stray notes
        • 玩樂情報
        • 生活話題
        • 經方中醫
        • Unclass

      Blog List

      QR-Code and APP Launcher

      User Guide
      This Webpage

      In those service tabs, "Scan QRCode, in mobile device" or "Click the button, in this device" to open webpage or APP-related operations.
      QRCode

      Visitors

      • Visitors : 8,368,325
      • Hits : 8,553,028
      • Depth : 102.2 %
      • YamPiz Hero Blog
        This service architecture and content service provider.
      • Auto Platform
        For better browsing experience, it will auto detects your device to display webpage.
      • Bug Report
        Tell us about the idea, problem and errors you found.
      • Comodo Secure
        The sensitive data transmission adopts by SSL-2048 authenticated encryption.
      • Copyright
        © 2009 YamPiz Digital Inc. & Jaby Group. All rights reserved.
      • Revised Version
        V2.2.210
        10 Mar 2025 (GMT+8)