[轉貼]Caching template system
版主: 版主管理群
[轉貼]Caching template system
Source: http://phpbb.sourceforge.net/phpBB2/vie ... php?t=7495
Author: psoTFX
功用: 加速網頁讀取速度\r
方式:
1. flat file system
2. db system
經討論好像是用flat file比較快.. 有看到的人值得試一下喔..
只要把原來的 includes/template.php 備份起來, 然後把下載的 template_db_cache.php.txt或template_file_cache.php.txt 存成 template.php, 其他步驟就直接到 http://phpbb.sourceforge.net/phpBB2/vie ... php?t=7495 去看了...
使用 flat file system的計的要 chmod 777 /cache 和 /cache/admin
試過以後, 有明顯感覺速度有變快
Author: psoTFX
功用: 加速網頁讀取速度\r
方式:
1. flat file system
2. db system
經討論好像是用flat file比較快.. 有看到的人值得試一下喔..
只要把原來的 includes/template.php 備份起來, 然後把下載的 template_db_cache.php.txt或template_file_cache.php.txt 存成 template.php, 其他步驟就直接到 http://phpbb.sourceforge.net/phpBB2/vie ... php?t=7495 去看了...
使用 flat file system的計的要 chmod 777 /cache 和 /cache/admin
試過以後, 有明顯感覺速度有變快
OOHOO said:
有事Mail給我, 不要P我, 因為根本沒辦法P.
有事Mail給我, 不要P我, 因為根本沒辦法P.
我按照ktvktv大大的步驟去做,網頁讀取速度變快了!可是還是有出現一些問題ktvktv 寫: 1. 我先下載了template_file_cache.php.txt
2. 我把/includes/template.php 給命名為 temlatebackup.php
3. 我把 template_file_cache.php.txt 改名為 template.php然後上傳到/includes
4. 我到/templates/subsilver/ 裡面 成立 /cache 和 /cache/admin 然後chmod成777
在討論區的最上面出現了這些東東\r
熱門主題的上面的空白的地方出現下面這幾行東東\rWarning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\\includes\sessions.php on line 301
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\sessions.php on line 302
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 450
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 451
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 452
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 453
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 454
這是什麼問題ㄌㄟ?Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\sessions.php on line 301
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\sessions.php on line 302
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 450
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 451
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 452
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 453
Warning: Cannot add header information - headers already sent by (output started at f:\appserv\www\phpbb2\includes\template.php:522) in f:\appserv\www\phpbb2\includes\page_header.php on line 454
我的系統是win2000 pro
appserv-win32-1.4.0
phpBB2是竹貓1.22正體中文版
荷葉何田田,戲水荷池西,
蓮葉雖豐潤,心中含苦悲。
荷葉何田田,戲水畫堂東,
荷花雖言美,凋殘亦匆匆!
蓮葉雖豐潤,心中含苦悲。
荷葉何田田,戲水畫堂東,
荷花雖言美,凋殘亦匆匆!
OOHOO大大:
我的/includes/page_header.php的450~454行是這樣的
這是怎樣ㄌㄟ?
我的/includes/page_header.php的450~454行是這樣的
代碼: 選擇全部
header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: pre-check=0, post-check=0, max-age=0");
header ("Pragma: no-cache");
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
荷葉何田田,戲水荷池西,
蓮葉雖豐潤,心中含苦悲。
荷葉何田田,戲水畫堂東,
荷花雖言美,凋殘亦匆匆!
蓮葉雖豐潤,心中含苦悲。
荷葉何田田,戲水畫堂東,
荷花雖言美,凋殘亦匆匆!
檢查一下你的template.php, 看看最下面 ?> 以後還有沒有多餘的空行, 刪掉 ?> 以後的所有空行(指標要粘在?>的屁股).
如果還不行的話, 你可以試試另一種用db的cache方式, http://phpbb.sourceforge.net/phpBB2/vie ... php?t=7495 也有講, 步驟差不多,
不同的是以db來儲存這些快取資料...
如果還不行的話, 你可以試試另一種用db的cache方式, http://phpbb.sourceforge.net/phpBB2/vie ... php?t=7495 也有講, 步驟差不多,
不同的是以db來儲存這些快取資料...
OOHOO said:
有事Mail給我, 不要P我, 因為根本沒辦法P.
有事Mail給我, 不要P我, 因為根本沒辦法P.