article.php
来自「phpcms2007很好的cms内容管理系统,操作方便」· PHP 代码 · 共 35 行
PHP
35 行
<?php
defined('IN_PHPCMS') or exit('Access Denied');
$head['title'] = $article['title'];
$head['keywords'] = $article['keywords'];
$head['description'] = $article['title'].$article['keywords'];
require PHPCMS_ROOT.'/yp/web/admin/include/common.inc.php';
//$filename -> createhtml($filename, $mod_root = '')
$headerpath = '/yp/web/userdata/'.$_userdir.'/'.$domainName.'/header.php';
$filepath = PHPCMS_ROOT.'/yp/web/userdata/'.$_userdir.'/'.$domainName.'/'.$filename.'/';
$htmlfilename = $filepath.$articleid.'.php';
is_dir($filepath) or dir_create($filepath);
$templateid = $tplType.'-article_show';
$data = "<?php defined('IN_PHPCMS') or exit; include PHPCMS_ROOT.'$headerpath'; ?>";
ob_start();
include template($mod, $templateid);
$data .= ob_get_contents();
ob_clean();
file_put_contents($htmlfilename, $data);
@chmod($htmlfilename, 0777);
if(!file_exists($headerpath))
{
$data = "<?php defined('IN_PHPCMS') or exit;?>";
ob_start();
include template($mod, $tplType.'-header');
$data .= ob_get_contents();
ob_clean();
file_put_contents($headerpath, $data);
@chmod($headerpath, 0777);
}
return TRUE;
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?