这是首页的代码,看不太懂,各位大大能分析分析吗
<?php
require dirname(__FILE__).'/include/common.inc.php';
$head['title'] = $PHPCMS['sitename'].'_'.$PHPCMS['meta_title'];
$head['keywords'] = $PHPCMS['meta_keywords'];
$head['description'] = $PHPCMS['meta_description'];
header('Last-Modified: '.gmdate('D, d M Y H:i:s', TIME).' GMT');
header('Expires: '.gmdate('D, d M Y H:i:s', TIME+CACHE_PAGE_INDEX_TTL).' GMT');
header('Cache-Control: max-age='.CACHE_PAGE_INDEX_TTL.', must-revalidate');include template('phpcms', 'index');
cache_page(CACHE_PAGE_INDEX_TTL);
?>
<?php
require dirname(__FILE__).'/include/common.inc.php';
$head['title'] = $PHPCMS['sitename'].'_'.$PHPCMS['meta_title'];
$head['keywords'] = $PHPCMS['meta_keywords'];
$head['description'] = $PHPCMS['meta_description'];
header('Last-Modified: '.gmdate('D, d M Y H:i:s', TIME).' GMT');
header('Expires: '.gmdate('D, d M Y H:i:s', TIME+CACHE_PAGE_INDEX_TTL).' GMT');
header('Cache-Control: max-age='.CACHE_PAGE_INDEX_TTL.', must-revalidate');include template('phpcms', 'index');
cache_page(CACHE_PAGE_INDEX_TTL);
?>
<?php//这个貌似是PHPCMS的代码
//引入公用文件common.inc.php
require dirname(__FILE__).'/include/common.inc.php';//设定站点名称sitename,以及meta,还有关键词
$head['title'] = $PHPCMS['sitename'].'_'.$PHPCMS['meta_title'];
$head['keywords'] = $PHPCMS['meta_keywords'];
$head['description'] = $PHPCMS['meta_description'];//设定最后修改日期
header('Last-Modified: '.gmdate('D, d M Y H:i:s', TIME).' GMT');//设定缓存的失效日期
header('Expires: '.gmdate('D, d M Y H:i:s', TIME+CACHE_PAGE_INDEX_TTL).' GMT');//指定请求和响应遵循的缓存机制
header('Cache-Control: max-age='.CACHE_PAGE_INDEX_TTL.', must-revalidate');//加载模版index
include template('phpcms', 'index');//这个不明白是什么意思,具体得看那个函数是怎么写的,估计是加载缓存文件
cache_page(CACHE_PAGE_INDEX_TTL);
?>
可知,这个网站时由 phpcms 文件管理系统搭建的
而使用 phpcms 是不需要有 php 知识的(当然,有最好)
你可以下载一个 phpcms 手册,自己看一下