在phpcms根目录创建 : crond 目录。然后创建:create_index php
在phpcms根目录创建 : crond 目录。
然后创建:create_index.php
然后创建:create_index.php
<?php
//15分钟一次,生成首页
# */15 * * * * php /data/wwwroot/www.phpip.com/www/crond/create_index.php
set_time_limit(300);
define('PHPCMS_PATH', substr(dirname(__FILE__),0,-6).DIRECTORY_SEPARATOR);
if(file_exists(PHPCMS_PATH.'../phpcms/base.php')) {
include PHPCMS_PATH.'../phpcms/base.php';
} else {
include PHPCMS_PATH.'phpcms/base.php';
}
$param = pc_base::load_sys_class('param');
$html = pc_base::load_app_class('html','content');
$size = $html->index();
?>
//15分钟一次,生成首页
# */15 * * * * php /data/wwwroot/www.phpip.com/www/crond/create_index.php
set_time_limit(300);
define('PHPCMS_PATH', substr(dirname(__FILE__),0,-6).DIRECTORY_SEPARATOR);
if(file_exists(PHPCMS_PATH.'../phpcms/base.php')) {
include PHPCMS_PATH.'../phpcms/base.php';
} else {
include PHPCMS_PATH.'phpcms/base.php';
}
$param = pc_base::load_sys_class('param');
$html = pc_base::load_app_class('html','content');
$size = $html->index();
?>
linux 下:
crontab -e
*/15 * * * * php /data/wwwroot/www.phpip.com/www/crond/create_index.php
注意:路径自己修改。
![PHPCMS V9多站点[站群功能]动态设置与静态设置子站内容URL](http://d.hiphotos.baidu.com/album/pic/item/4bed2e738bd4b31ca4464fd586d6277f9e2ff862.jpg)



