tp處理首頁高並發訪問

來源:互聯網
上載者:User

標籤:tp加鎖

  1. 首先靜態緩衝首頁

650) this.width=650;" src="http://s2.51cto.com/wyfs02/M00/8C/20/wKioL1hjLkDR2cIUAAA2Qoxdyqo214.png" title="捕獲cache.PNG" alt="wKioL1hjLkDR2cIUAAA2Qoxdyqo214.png" />

2.會在目錄中產生一個index.shtml靜態快取檔案;

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/8C/20/wKioL1hjL0yzOdt4AAAGNsZS-wE093.png" title="捕獲ca.PNG" alt="wKioL1hjL0yzOdt4AAAGNsZS-wE093.png" />

3.靜態檔案都有緩衝器,當時間一到,高並發訪問首頁時,會產生資料庫壓力,這時用到檔案鎖,

改變tp讀取html行為檔案的代碼;

4.注意點,fp得設定成全域變數,檔案鎖得自己手動建立;

650) this.width=650;" src="http://s4.51cto.com/wyfs02/M00/8C/20/wKioL1hjLvvQgXRtAACCSiootBw177.png" style="float:none;" title="捕獲read.PNG" alt="wKioL1hjLvvQgXRtAACCSiootBw177.png" />

650) this.width=650;" src="http://s4.51cto.com/wyfs02/M02/8C/20/wKioL1hjLvvgmiz3AACfPoiuRDA410.png" style="float:none;" title="捕獲tp.PNG" alt="wKioL1hjLvvgmiz3AACfPoiuRDA410.png" />


本文出自 “12104979” 部落格,請務必保留此出處http://12114979.blog.51cto.com/12104979/1886810

tp處理首頁高並發訪問

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.