用户名 密码 记住我 还未注册?

xoops缓存分析及静态化方案 [技术论坛 - XOOPS使用]

XOOPS China 讨论区 > XOOPS Core (核心) > XOOPS使用 > xoops缓存分析及静态化方案

正在浏览:   1 名游客



 到底部   前一个主题   下一个主题  [无发表权] 请登录或者注册

(1) 2 3 »


xoops缓存分析及静态化方案
Support Team
注册日期:
2005/4/30 13:09
来自 安徽安庆
所属群组:
网站管理员
帖子: 510 | 精华: 3
等级: 20; EXP: 84
HP: 0 / 496
MP: 170 / 7610
离线
1. xoops可以设置缓存,在系统设置里面可以设置不同的模块,不同的缓存时间。比如设置article模块,缓存1小时,在访问http://www.example.com/modules/article/index.php 在没有缓存文件存在的情况下,运行产生缓存文件,在后面1小时内,访问此页面直接调用缓存文件,提高访问速度。但是,这会产生几个问题。
一,部分内容不能缓存,例如article的点击数,通过XoopsFormHiddenToken产生的xoops内部认证码,需要后期加载的验证码,都不能被缓存。前面我已经说过可以通过
$xoopsTpl ->register_function("count","article_count",false);通过article_count($params, $smarty),对页面展示点击数内容进行不缓存。但有些问题,此法在xoops2.26可以使用,在xoops2.016用起来可能会有些麻烦。为什么
会这样呢?首先我想以我的方式来解释下xoops页面结构。举个例子,article的view.article.php

include "header.php";  // 我认为是xoops全局变量的初始,必会调用根目录/mainfile.php,根目录/include/common.php
//-----------------------------------------


此部分是module全局变量的加载


//-------------------------------------------

include XOOPS_ROOT_PATH "/header.php"//此块是区块的展示和module内容是否是缓存内容的判断,如果module内容
已经缓存,下面代码将不在运行

//----------------------------------

此部分是module内容,非已经缓存状态下,写到themes的<{$xoops_contents}>

//-------------------------

xoops2.26的smarty加载是在include "header.php",在根目录/include/common.php里加载完成,而xoos2.016是在include XOOPS_ROOT_PATH . "/header.php";加载完成。 $xoopsTpl ->register_function("count","article_count",false)这段代码必须在include XOOPS_ROOT_PATH . "/header.php"的checkcache之前定义。因为之后定义,如果内容已经缓存smarty将编译不了<{count}>。通常xoops2.26我可以在include "header.php" 和include XOOPS_ROOT_PATH . "/header.php";
之间定义$xoopsTpl ->register_function("count","article_count",false),但在xoops2.016我找不到在哪定义比较好。

二.当内容重新编辑或者有人发表评论需要及时显示的时候与缓存之间的矛盾。这个问题就是涉及到brent在繁体中文的一个问题。首先要弄清楚cacheid的产生,请看
class/theme.php中的259行
$this->contentCacheId = $this->_generateCacheId($dirname, str_replace( XOOPS_URL, '', $_SERVER['REQUEST_URI'] ));

contentCacheId是与$_SERVER['REQUEST_URI']有密切关系的,所以$_SERVER['REQUEST_URI']必须要规范。例如我们看下
view.article.php中86-100行代码

if(!empty($REQUEST_URI_parsed)){
    
$args_REQUEST_URI = array();
    if(!empty(
$article_id)){
        
$args_REQUEST_URI[] = "article="$article_id;
    }
    if(!empty(
$page)){
        
$args_REQUEST_URI[] = "page="$page;
    }
    if(!empty(
$category_id)){
        
$args_REQUEST_URI[] = "category="$category_id;
    }
    
$_SERVER["REQUEST_URI"] = substr($_SERVER["REQUEST_URI"], 0strpos($_SERVER["REQUEST_URI"], "/modules/".$GLOBALS["artdirname"]."/view.article.php")). 
        
"/modules/".$GLOBALS["artdirname"]."/view.article.php".
        (empty(
$args_REQUEST_URI)? "" "?".implode("&",$args_REQUEST_URI));
}

举个例子:http://www.example.com/modules/article/view.article.php/c1/1
经过上述代码以后会$_SERVER['REQUEST_URI']=/modules/article/view.article.php?article=1&category=1
这就是我们所需要的。比如我们编辑这篇文章,提交都会通过action.article.php,在保存之后,添加如

$xoopsTpl
->clear_cache("db:arcticle摸板",$xoopsTpl->_generateCacheId($dirname,"/modules/article/view.article.php?article=1&category=1")

D.J在action.article.php 的处理是

// Clear caches
    
load_functions("cache");
    
$dirname $GLOBALS["artdirname"];
    
$pattern_uri urlencode("/modules/{$dirname}/view.article.php?article=".$article_obj->getVar("art_id"));
    
mod_clearSmartyCache("/^{$dirname}^.*{$pattern_uri}.*{$dirname}_article.html$/");

我认为mod_clearSmartyCache是将文件目录文件名遍历一遍,当文件过多时,很明显会减慢速度。

2.xoops静态化方案。受文明猪的思路所影响,我的方案是继承于他的思路,所以此方案的版权归他。
当然,重申一句,我没有看见他的相关代码,只看过他演示的实例。
此方案的前提是在后台启用cookie 存储xoops的session,并修改区块登陆模块,增加id="checklogin"。
1.增加xoopscache到class目录
xoopscache主要完成读,写html静态内容.
2.增加cachedata.php到include目录

<?php
$cachedate
=array(
  
"system"=>
      array (
      
"index"=>
          array (
            
'cache_id' => '1',
            
'dirname' => 'system',
            
'page_url' => 'index',
            
'build_func' => 'buildindex.php',
            
'forcetrue' => '0',
            
'cachetime' => '1800',
          ),
   ),
  
"newbb"=>
  array (
      
"index"=>
          array (
            
'cache_id' => '1',
            
'dirname' => 'newbb',
            
'page_url' => 'index',
            
'build_func' => 'buildindex.php',
            
'forcetrue' => '0',
            
'cachetime' => '1800',
          ),
   ),
)
?>

cachedata主要是静态文件的配置。

xoopscache内容
<?php
if (!defined('XOOPS_ROOT_PATH')) {
    exit();
}
class 
XoopsCache
{
     var 
$CacheHandler;
     var 
$cacheid=0;
     var 
$cache_info=array();
     var 
$cachecontent;
     var 
$buidfunc;
     var 
$cachetime=0;
     var 
$startdir ="";
     var 
$builddir ="";
     var 
$cachefile="";
     var 
$extra="";
     var 
$htmldir="";
     var 
$iscached=false;
     var 
$setcached=false;
     
    function 
XoopsCache()
    {
         
$this->htmldir=XOOPS_ROOT_PATH."/html";
    }
    
    function &
instance() {
        static 
$instance;
    
        if ( !isset( 
$instance ) ) {
            
$instance = new XoopsCache();
        }
        return 
$instance;
    }
    
    function 
getByUrl($url="",$dirname =  "system")
    {
        
$ret=array();
        if(empty(
$url))return $ret;
        include_once 
XOOPS_ROOT_PATH."/include/cachedata.php";
$cachedate=$cachedate[$dirname];//新加的
        
if(is_array($cachedate)&&isset($cachedate[$url])&&($cachedate[$url]["cachetime"]>0))
        {
            
$this->cachetime=$cachedate[$url]["cachetime"];
            
$this->buidfunc=$cachedate[$url]["build_func"];
            if(!
$this->setCachedir($url,$dirname))return $ret;
            if(
$cachedate[$url]["forcetrue"])
            {
                
$ret=$cachedate[$url];
                
$this->iscached=false;
                
$this->setcached=true;
                return 
$ret;
            }
            if(
$_contents=$this->_read_file($this->cachefile))
            {
                
$_info_start strpos($_contents"n") + 1;
                
$_info_len = (int)substr($_contents0$_info_start 1);
                
$_cache_info unserialize(substr($_contents$_info_start$_info_len));
                if(isset (
$_cache_info['expires']))
                {
                    if (
$_cache_info['expires'] > -&& (time() < $_cache_info['expires'])) {
                          
$this->cachecontent substr($_contents$_info_start $_info_len);
                          
$this->iscached=true;
                     }
                     else 
                     {
                            
$this->iscached=false;
                            
$this->setcached=true;
                     }
                }
            }
            else 
            {
                 
$this->iscached=false;
                 
$this->setcached=true;
            }
            
            
$ret=$cachedate[$url];
        }
        return 
$ret;
    }
    function 
setCachedir($url,$dirname="system")
    {
        
$htmldir=$this->getHtmlDir($dirname);
            if(!
is_dir($htmldir))
            {
                if(!
$this->createDir($htmldir))return false;
            }
            if(empty(
$this->cacheid))
            
$this->cachefile=$htmldir."/".$url.".html";
            else 
$this->cachefile=$htmldir."/".$url."_".$this->cacheid.".html";
            return 
true;
    }
    function 
clearCachefile($url,$dirname="system")
    {
        if(empty(
$url))return false;
        
$this->setCachedir($url,$dirname);
        if (
file_exists($this->cachefile)) {
        return @
unlink($this->cachefile);
        }
        return 
false;
    }
    function 
createCacheHtml($content)
    {
        if(!
$this->setcached||empty($this->cachefile)||empty($this->cachetime)||empty($content))return false;
            
$this->cache_info['timestamp'] = time();
        if (
$this->cachetime > -1){
            
$this->cache_info['expires'] = $this->cache_info['timestamp'] + $this->cachetime;
        } else {
            
$this->cache_info['expires'] = -1;
        }
        
$_cache_info serialize($this->cache_info);
        
$content=strlen($_cache_info) . "n" $_cache_info $content;
        
$_dirname dirname($this->cachefile);
        
$_tmp_file tempnam($_dirname'wrt');
        if (!(
$fd = @fopen($_tmp_file'wb'))) {
            
$_tmp_file $_dirname DIRECTORY_SEPARATOR uniqid('wrt');
            if (!(
$fd = @fopen($_tmp_file'wb'))) {
                
trigger_error("problem writing temporary file '$_tmp_file'",E_USER_ERROR);
                return 
false;
            }
        }
            
fwrite($fd$content);
            
fclose($fd);
            if (
file_exists($this->cachefile)) {
                @
unlink($this->cachefile);
            }
            @
rename($_tmp_file$this->cachefile);
            @
chmod($this->cachefile0777);
        
           return 
true;
    }
    
    function 
createDir$dirName,  $mode 0777 )
     {
         if(
file_exists($dirName)) return true;
         if(
substr($dirNamestrlen($dirName)-1) == "/" ){
             
$dirName substr($dirName0,strlen($dirName)-1);
         }
         
$firstPart substr($dirName,0,strrpos($dirName"/" ));           
         if(
file_exists($firstPart)){
             if(!
mkdir($dirName,$mode)) return false;
             
chmod$dirName$mode );
         } else {
             
$this->createDir($firstPart,$mode);
             if(!
mkdir($dirName,$mode)) return false;
             
chmod$dirName$mode );
         }
         return 
true;
     }
    function 
_read_file($filename)
    {
        if ( 
file_exists($filename) && ($fd = @fopen($filename'rb')) ) {
            
$contents '';
            while (!
feof($fd)) {
                
$contents .= fread($fd8192);
            }
            
fclose($fd);
            return 
$contents;
        } else {
            return 
false;
        }
    }
    function 
delete$file null )
     {
        if( !
is_readable$file ))
            return 
false;
         
         if( 
is_dir$file ))
             
$result = @rmdir$file );
         else
             
$result = @unlink$file );
         
         return 
$result;
     }
    function 
getHtmlDir($dirname="system")
    {
        return 
$this->htmldir."/".$dirname;
    }
    function 
isCached()
    {
        return 
$this->iscached;
    }
    function 
setCache($var=false)
    {
        
$this->setcached=$var;
    }
    function 
isSetCached()
    {
        return 
$this->setcached&&!empty($this->cachefile);
    }
    function 
setCachehandler(&$handler)
    {
        
$this->CacheHandler=$handler;
    }
    function 
getStartdir()
    {
        return 
$this->startdir;
    }
    function 
getBuildfunc()
    {
        return 
$this->buidfunc;
    }
    function 
getCachefile()
    {
        return 
$this->cachefile;
    }
    function 
getContent()
    {
        return 
$this->cachecontent;
    }
}
?>

我主要是在getByUrl里面判断是否静态化。

3.在include/common.php修改代码
在xoops =& new xos_kernel_Xoops2();后面添加

include_once XOOPS_ROOT_PATH."/class/xoopscache.php";
    
$xoopscache=& XoopsCache::instance();
    if(
$findurl=strstr($_SERVER['PHP_SELF'],"/modules"))
    {
        
$url_arr=explode("/",$findurl);
        
$xoopscache->getByUrl(substr($url_arr[3],0,strpos($url_arr[3],".php")),$url_arr[2]);
    }
    elseif(
$findurl=strrchr($_SERVER['PHP_SELF'],"/"))
    {
        
$url_arr=explode("/",$findurl);
        
$xoopscache->getByUrl(substr($url_arr[1],0,strpos($url_arr[1],".php")));
    }
    if(
$xoopscache->isCached())
    {
        echo 
$xoopscache->getContent();
        exit();
    }

4.添加include/buildindex.php
<?php
$xoopsOption
["nocommon"]=1;
include 
"../mainfile.php";
include_once 
XOOPS_ROOT_PATH '/class/logger.php';
$xoopsLogger =& XoopsLogger::instance();
 include_once 
XOOPS_ROOT_PATH.'/include/functions.php';
 require_once 
XOOPS_ROOT_PATH.'/class/database/databasefactory.php';
if (
$_SERVER['REQUEST_METHOD'] != 'POST' || !$xoopsSecurity->checkReferer(XOOPS_DB_CHKREF)) {
    
define('XOOPS_DB_PROXY'1);
}
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();

// ################# Include required files ##############
require_once XOOPS_ROOT_PATH.'/kernel/object.php';
require_once 
XOOPS_ROOT_PATH.'/class/criteria.php';

// #################### Include text sanitizer ##################
include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php";
$config_handler =& xoops_gethandler('config');
$xoopsConfig =& $config_handler->getConfigsByCat(XOOPS_CONF);
$xoopsUser '';
$xoopsUserIsAdmin false;
$member_handler =& xoops_gethandler('member');
$sess_handler =& xoops_gethandler('session');
if (
$xoopsConfig['use_ssl'] && isset($_POST[$xoopsConfig['sslpost_name']]) && $_POST[$xoopsConfig['sslpost_name']] != '') {
    
session_id($_POST[$xoopsConfig['sslpost_name']]);
} elseif (
$xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
    if (isset(
$_COOKIE[$xoopsConfig['session_name']])) {
        
session_id($_COOKIE[$xoopsConfig['session_name']]);
    }
    if (
function_exists('session_cache_expire')) {
        
session_cache_expire($xoopsConfig['session_expire']);
    }
    @
ini_set('session.gc_maxlifetime'$xoopsConfig['session_expire'] * 60);     
}
session_set_save_handler(array(&$sess_handler'open'), array(&$sess_handler'close'), array(&$sess_handler'read'), array(&$sess_handler'write'), array(&$sess_handler'destroy'), array(&$sess_handler'gc'));
session_start();
if (!empty(
$_SESSION['xoopsUserId'])) {
    
$xoopsUser =& $member_handler->getUser($_SESSION['xoopsUserId']);
    if (!
is_object($xoopsUser)) {
        
$xoopsUser '';
        
$_SESSION = array();
    } else {
        if (
$xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
            
setcookie($xoopsConfig['session_name'], session_id(), time()+(60*$xoopsConfig['session_expire']), '/',  ''0);
        }
        
$xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
        
$xoopsUserIsAdmin $xoopsUser->isAdmin();
    }
}

 
$rendbuild='
 function rebuild(){
 var s = "";'
;
 if(
is_object($xoopsUser))
 {
      
$rendbuild.=
 
's="fff";';
 }
 else 
 {
 
$rendbuild.=
 
's="";';
 }
 
$rendbuild.='if(s){
 document.getElementById("checklogin").innerHTML=s;
   }
 }
'
;
 echo 
$rendbuild;
?>

可以看到buildindex.php 主要是用来反写checklogin里面内容,比如已经登陆的话,反写已经登陆的信息,具体内容请自行添加。

5.更改class/theme.php
将285行将 global $xoops, $xoopsLogger;改为 global $xoops, $xoopsLogger,$xoopscache;

在 if ( $this->bufferOutput ) {
$this->content .= ob_get_contents();
ob_end_clean();
}
后面添加

if($this->template->get_template_vars("xoops_isuser"))
        
$xoopscache->setCache(false);
             if(
$xoopscache->isSetCached())
        {
            
$this->addScript(XOOPS_URL."/include/".$xoopscache->getBuildfunc());
            
$this->content.='<script type="text/javascript">rebuild();</script>';
        }

在$this->template->display( $this->path . '/' . $this->canvasTemplate );前面
添加

if($xoopscache->isSetCached())
         {
          
ob_start();
           
$this->template->display$this->path '/' $this->canvasTemplate );
            
$results ob_get_contents();
            
$xoopscache->createCacheHtml($results);
             return 
true;
         }

ok,静态化基本完成,大家可以试下了。
应用实例http://www.lvye.info/modules/blog/
绿野文章等。

2007/8/19 18:26
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
初级会员
注册日期:
2007/2/21 23:56
所属群组:
注册会员
帖子: 37 | 精华: 2
等级: 4; EXP: 85
HP: 0 / 96
MP: 12 / 967
离线
有没有人测试一下

我弄了以后还是差不多,可能我的CPU太老了

2007/8/21 18:34
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
高级会员
注册日期:
2004/12/22 15:03
所属群组:
注册会员
帖子: 145
等级: 11; EXP: 9
HP: 0 / 252
MP: 48 / 4129
离线
謝謝agl提供這樣好的文章,我想問一下如果我照改了以上的方式是對整個系統都會加快嗎??
還是祇是對 模組 article有用

第二問題是更改之後在後台設置緩存還有用嗎?

2007/8/25 8:49
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
Support Team
注册日期:
2005/4/30 13:09
来自 安徽安庆
所属群组:
网站管理员
帖子: 510 | 精华: 3
等级: 20; EXP: 84
HP: 0 / 496
MP: 170 / 7610
离线
<?php 
$cachedate
=array( 
  
"system"=> 
      array ( 
      
"index"=> 
          array ( 
            
'cache_id' => '1'
            
'dirname' => 'system'
            
'page_url' => 'index'
            
'build_func' => 'buildindex.php'
            
'forcetrue' => '0'
            
'cachetime' => '1800'
          ), 
   ), 
  
"newbb"=> 
  array ( 
      
"index"=> 
          array ( 
            
'cache_id' => '1'
            
'dirname' => 'newbb'
            
'page_url' => 'index'
            
'build_func' => 'buildindex.php'
            
'forcetrue' => '0'
            
'cachetime' => '1800'
          ), 
   ), 

?>

静态化页面由此配置指定,主要是针对频道页静态化,如果要对比较多的页面静态化其实也可以.但是有些问题需要清楚,比如静态化后,部分内容又须动态(例如登陆前后,点击数等),这些如何去处理,需要去认识清楚.所以,修改的话须要对xoops架构有比较深的认识,或者只是在本地测试学习用.如果成功的话,会在根目录产生html/文件夹,静态文件在此里面.我举的这个现在只针对频道页,因为文章内容涉及到权限,点击评论等,没有教好的通用性.因为静态化会避免加载很多东西,对性能会有所提高.绿野在静态化之前会出现服务器压力过大而需重起机器,但对几个频道和article文章(只针对游客)做了静态化后,这种情况有较好的缓解,而且还不包括对压力最大的论坛进行静态化处理.
在静态化页面指定时间内,被静态化的页面缓存不起作用.缓存与静态化区别,是缓存只针对页面部分内容进行处理,所以必须要加载xoops系统变量,如smarty等.静态化是对整个页面处理,因为要考虑部分内容动态,需要加载使部分动态内容所需的系统变量.

2007/8/25 17:22
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
高级会员
注册日期:
2004/12/22 15:03
所属群组:
注册会员
帖子: 145
等级: 11; EXP: 9
HP: 0 / 252
MP: 48 / 4129
离线
如果單純的以加載了系統的負荷來加快其頁面的速度,我想我會很樂意的接受,因為現在四核心已經出世,加上內存可以至8G ,我自己都是以自己的機器架站,但是一直無法解決的問題是>>速度 ,頻寬方面我上傳可以到 200k / sec ( 1M =1024k)

我在台灣覺得您的網站速度很快 ,我想應該有對模組 article
作優化 ,大致上我覺得自己的hack可能很有用,但我們倆的模組不同,加上我的模組有osc正在進行,這個可能對我不適用

不過還是謝謝您的寶貴的文章,因為給一般用戶使用也真的不容易..

^^

2007/8/27 9:25
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
初级会员
注册日期:
2007/2/21 23:56
所属群组:
注册会员
帖子: 37 | 精华: 2
等级: 4; EXP: 85
HP: 0 / 96
MP: 12 / 967
离线
引用:
修改区块登陆模块,增加id="checklogin"。


这个在哪里修改,我不太清楚,麻烦给讲解一下

2007/9/9 11:06
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
Support Team
注册日期:
2005/4/30 13:09
来自 安徽安庆
所属群组:
网站管理员
帖子: 510 | 精华: 3
等级: 20; EXP: 84
HP: 0 / 496
MP: 170 / 7610
离线

<div id="checklogin"><form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post">
    <{
$block.lang_username}><br />
    <
input type="text" name="uname" size="12" value="<{$block.unamevalue}>" maxlength="25" /><br />
    <{
$block.lang_password}><br />
    <
input type="password" name="pass" size="12" maxlength="32" /><br />
    <!-- <
input type="checkbox" name="rememberme" value="On" class ="formButton" /><{$block.lang_rememberme}><br /> //-->
    
<input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" />
    <
input type="hidden" name="op" value="login" />
    <
input type="submit" value="<{$block.lang_login}>" /><br />
    <{
$block.sslloginlink}>
</
form>
<
br />
<
a href="<{$xoops_url}>/register.php"><{$block.lang_registernow}></a> | 
<
a href="<{$xoops_url}>/user.php#lost"><{$block.lang_lostpass}></a>
</
div>

我将system_block_login.html改成这样, 多加了checklogin;

再在include/buildindex.php

$rendbuild
='
 function rebuild(){
 var s = "";'
;
 if(
is_object($xoopsUser))
 {
      
$rendbuild.=
 
's="<table cellspacing="0"><tr><td id="usermenu">';
 if(
$xoopsUserIsAdmin)
 
$rendbuild.='<a class="menuTop" href="http://localhost:8080/xoops216/admin.php">系统管理</a>';
 
$rendbuild.='<a href="http://localhost:8080/xoops216/user.php">帐号信息</a><a href="http://localhost:8080/xoops216/edituser.php">编辑帐号</a><a href="http://localhost:8080/xoops216/notifications.php">事件通知</a><a href="http://localhost:8080/xoops216/viewpmsg.php">个人信箱</a><a href="http://localhost:8080/xoops216/user.php?op=logout">退出</a></td> </tr></table>";';
 }
 else 
 {
 
$rendbuild.=
 
's="";';
 }
 
$rendbuild.='if(s){
 document.getElementById("checklogin").innerHTML=s;
   }
 }
'
;
 echo 
$rendbuild;

通过document.getElementById("checklogin").innerHTML 将登陆用户反写.

2007/9/9 11:57
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
初级会员
注册日期:
2007/2/21 23:56
所属群组:
注册会员
帖子: 37 | 精华: 2
等级: 4; EXP: 85
HP: 0 / 96
MP: 12 / 967
离线
弱弱问一下,rebuild.php这个文件在哪里?

我按找你的方做了

html文件夹还是没有文件

2007/9/10 8:11
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
Support Team
注册日期:
2005/4/30 13:09
来自 安徽安庆
所属群组:
网站管理员
帖子: 510 | 精华: 3
等级: 20; EXP: 84
HP: 0 / 496
MP: 170 / 7610
离线
引用:
4.添加include/buildindex.php



引用:
2.增加cachedata.php到include目录

这些文件都是必不可少的.
另外请检测下是否有html目录,且可写

2007/9/10 8:38
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: xoops缓存分析及静态化方案
初级会员
注册日期:
2007/2/21 23:56
所属群组:
注册会员
帖子: 37 | 精华: 2
等级: 4; EXP: 85
HP: 0 / 96
MP: 12 / 967
离线
除了rebuild.php这个文件我没有找到,没有做修改外,其他的都按照你说的要求去做了,文件夹目录是可写的
网站地址在这里,我在自己的机器上测试,可能有点慢
http://www.dxx.com.cn/

您能不能加我QQ5130989

2007/9/10 10:46
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


(1) 2 3 »

  [无发表权] 请登录或者注册


不可查看帖子。
不可发帖。
不可回复。
不可编辑自己的帖子。
不可删除自己的帖子。
不可发起投票调查。
不可在投票调查中投票。
不可上传附件。
不可不经审核直接发帖。
不可使用主题类别。
不可使用HTML语法。
不可使用签名档。

[高级搜索]