PHPCMS 2008 SP3 模板语法规则整理

phpcms教程 强烈建议 2024-03-02 10:43 150 0

  IP //取得ip

  TIME //取得时间戳,格式(1229393941 )可以通过date 函数格式化一个本地时间/日期,请参考php手册

  URL //取得当前浏览的url地址

  SITE_URL //网站的url地址

  //以上是系统常量,直接调用,如()

  $MODULE //系统模块信息

  [MODULE][phpcms] => Array

  (

  [module] => phpcms

  [name] => Phpcms

  [path] =>

  [url] =>

  [iscore] => 1

  [version] => 1.0.0.0

  )

  $MODEL //模型信息

  [MODEL] => Array

  (

  [1] => Array

  (

  [modelid] => 1

  [name] => 新闻

  [description] =>

  [tablename] => news

  [itemname] => 新闻

  [itemunit] => 篇

  [workflowid] => 1

  [template_category] => category

  [template_list] => list

  [template_show] => show

  [template_print] => print

  [ishtml] => 1

  [category_urlruleid] => 1

  [show_urlruleid] => 7

  [enablesearch] => 1

  [ischeck] => 1

  [isrelated] => 1

  [disabled] => 0

  [modeltype] => 0

  )

  )

  $CATEGORY //栏目信息

  [CATEGORY] => Array

  (

  [1] => Array

  (

  [catid] => 1

  [module] => phpcms

  [type] => 1

  [modelid] => 0

  [catname] => 网站介绍

  [style] =>

  [image] =>

  [catdir] => about

  [url] => /cms/phpcms_utf/about/index.html

  [parentid] => 0

  [arrparentid] => 0

  [parentdir] =>

  [child] => 1

  [arrchildid] => 1,2,3,4,5

  [items] => 0

  [ismenu] => 0

  )

  )

  $TYPE //类型信息

  [TYPE] => Array

  (

  [1] => Array

  (

  [typeid] => 1

  [module] => link

  [name] => 默认分类

  [style] =>

  [typedir] =>

  [url] =>

  )

  )

  $AREA //地区信息

  [AREA] => Array

  (

  [1] => Array

  (

  [areaid] => 1

  [name] => 北京

  [style] =>

  [parentid] => 0

  [arrparentid] => 0

  [child] => 0

  [arrchildid] => 1

  )

  )

  $URLRULE //url规则信息

  [URLRULE] => Array

  (

  [1] => {$categorydir}/index.{$fileext}|{$categorydir}/{$page}.{$fileext}

  [2] => category/{$catid}.{$fileext}|category/{$catid}_{$page}.{$fileext}

  [3] => {$catdir}/index.{$fileext}|{$catdir}/{$page}.{$fileext}

  [4] => list.php?catid={$catid}|list.php?catid={$catid}&page={$page}

  [5] => list.php?catid-{$catid}.html|list.php?catid-{$catid}/page-{$page}.html

  [6] => list-{$catid}-{$page}.html

  [7] => {$year}/{$month}{$day}/{$contentid}.{$fileext}|{$year}/{$month}{$day}/{$contentid}_{$page}.{$fileext}

  [8] => {$categorydir}/{$year}/{$month}{$day}/{$contentid}.{$fileext}|{$categorydir}/{$year}/{$month}{$day}/{$contentid}_{$page}.{$fileext}

  [9] => show/{$contentid}.{$fileext}|show/{$contentid}_{$page}.{$fileext}

  [10] => show.php?contentid={$contentid}|show.php?contentid={$contentid}&page={$page}

  [11] => show.php?contentid-{$contentid}.html|show.php?contentid-{$contentid}/page-{$page}.html

  [12] => show-{$contentid}-1.html|show-{$contentid}-{$page}.html

  [13] => {$typedir}/index.{$fileext}|{$typedir}/{$page}.{$fileext}

  [14] => {$typedir}.{$fileext}|{$typedir}_{$page}.{$fileext}

  [15] => {$typeid}.{$fileext}|{$typeid}_{$page}.{$fileext}

  [16] => list.php?typeid={$typeid}|list.php?typeid={$typeid}&page={$page}

  [17] => list.php?typeid-{typeid}.html|list.php?typeid-{typeid}/page-{$page}.html

  [19] => {$typedir}/{$filename}.{$fileext}

  [20] => {$typedir}_{$filename}.{$fileext}

  [21] => {$filename}.{$fileext}

  [22] => show.php?specialid={$specialid}

  [23] => show.php?specialid-{$specialid}.html

  [24] => show-{$specialid}.html

  [25] => show-{$id}.html

  [26] => ask/list-{$catid}-{$action}-1.html|ask/list-{$catid}-{$action}-{$page}.html

  [27] => {$id}.html

  [28] => show.php?id={$id}

  )

  $M //存储模块信息,在模块下想得到该模块的信息 可以直接使用$M

本站资源均来自互联网或会员发布,如果不小心侵犯了您的权益请与我们联系。我们将立即删除!谢谢!