变量输出

系统名称:Custmao(开心猫市)

自定义变量: test变量

当前模板目录:demo

当前模板:tptag/tpls

变量输出

项目路径:

项目目录:E:\webs\bakups\custom (完整)

视图目录:E:\webs\bakups\custom/views (完整)

缓存目录:E:\webs\bakups\custom\xvars/dtmp (完整)

第三方UI目录:E:\webs\bakups\share_ximps/vendui (完整)

视图路径:/views

缓存路径:/xvars/dtmp

第三方UI路径:/ximps/vendui

常用 $this 对象

当前路由参数:mod=tptag, key=tpls, view=, mkv=tptag-tpls

当前模板:tptag/tpls

加载CSS/JS

常规加载:

PHP简写: 以下代码,要放在php标签里面,{tpldir}为当前模板目录,{mdodir}为当前模型目录:

模板包含

模板继承

{`imp:"tptag/_layout"} {block:myname}定义区块{/block:myname} 用{:parent}把原模版区块中的内容导入过来
使用{:clear}把原模版区块中的内容清空 

提示

系统变量:(`$_cbase`为 global变量,全局可用)

[array:26] array (
  'tpl' => 
  array (
    'vdir' => 'demo',
    'tpc_on' => 0,
    'tpc_ext' => '.cac_php',
    'no_static' => '(adm)',
    'def_static' => 'comm',
    'mob_tpls' => '(mob,comm,ven,vfr,vru,ves)',
    'tplpend' => '',
    'tplpext' => '',
  ),
  'sys' => 
  array (
    'lang' => 'cn',
    'sn' => '0BAB703D-127A-B479-1979-2010-0424X888',
    'ver' => '1.0',
    'cset' => 'utf-8',
    'tmzone' => '8',
    'tzcode' => 'PRC',
    'xpwby' => '贴心猫(imcat)/v1.0',
  ),
  'run' => 
  array (
    'timer' => 1590629256.197053,
    'memory' => 404496,
    'aclass' => 
    array (
      0 => '/core/blib/basEnv.php',
      1 => '/core/blib/basArray.php',
      2 => '/core/glib/glbConfig.php',
      3 => '/core/glib/safComm.php',
      4 => '/core/blib/basLang.php',
      5 => '/core/vops/vopShow.php',
      6 => '/core/vops/vopTpls.php',
      7 => '/core/vops/vopUrl.php',
      8 => '/core/vops/vopComp.php',
      9 => '/core/clib/comFiles.php',
      10 => '/core/blib/basStr.php',
      11 => '/core/clib/comStore.php',
      12 => '/core/vops/vopCTag.php',
      13 => '/core/clib/comCookie.php',
      14 => '/core/blib/basJscss.php',
    ),
    'domain' => '-',
    'dmtop' => '-',
    'stamp' => 1590629256,
    'userag' => 'CCBot/2.0 (https://commoncrawl.org/faq/)',
    'userip' => '34.231.21.83',
    'query' => 0,
    'qtime' => 0,
    'jsimp' => ',/demo/assets/cinfo.css,/demo/tptag/cijs/funcs.js,/base/assets/cssjs/cinfo.css,/base/assets/jslib/jsbase.js,/layer/layer.js,',
    'tplname' => 'tptag/tpls',
    'tplnow' => 'tptag/tpls',
    'tagnow' => '',
    'tmpFile' => 
    array (
    ),
    'jtype_mods' => '',
    'jtype_init' => '',
    'sobarnav' => '',
    'headed' => '',
    'iss' => 'http',
    'rsite' => '//custom.txjia.com',
    'rmain' => '//custom.txjia.com',
    'roots' => '//custom.txjia.com/root',
    'fbase' => '//custom.txjia.com/index.php',
    'tplcfg' => 
    array (
      0 => '示例版',
      1 => '/demo.php',
    ),
    'comp' => 'tptag/tpls',
    'tpls' => 
    array (
      0 => 'tptag/tpls',
    ),
  ),
  'ck' => 
  array (
    'pre' => 'v48_',
    'domain' => '',
    'path' => '/',
  ),
  'debug' => 
  array (
    'err_mode' => '1',
    'err_save' => 'file',
    'err_path' => '',
    'err_file' => 'Y-md',
    'err_hand' => true,
    'err_hkey' => '(def)',
    'log_save' => '',
    'pay_log' => 1,
    'db_sql' => '',
    'db_acts' => ',select,qSelect,find,',
    'db_area' => 
    array (
      0 => 'RUN_FRONT',
      1 => 'RUN_MOB',
    ),
    'db_time' => '100',
  ),
  'server' => 
  array (
    'txmao' => 'http://imcat.txjia.com',
    'txcode' => 'http://yscode.txjia.com',
    'txjia' => 'http://txjia.com',
  ),
  'ucfg' => 
  array (
    'vimg' => 'K',
    'ipapi' => 'Taobao',
    'guid' => 'Cook',
    'city' => '东莞',
    'space' => 30,
    'dbind' => 0,
    'ctab' => 'F00,F0F,060,00F,F60,90F,F69,06F,099,606,60F,906,F6F',
  ),
  'indoc' => 
  array (
    'debug' => true,
  ),
  'topic' => 
  array (
    'tpldir' => '/comm/topic',
  ),
  'part' => 
  array (
    'name' => '语言',
    'tab' => 
    array (
    ),
    'def' => 'cn',
    'mods' => 
    array (
    ),
    'psyn' => 
    array (
    ),
  ),
  'sys_editor' => 'kind',
  'sys_open' => '4',
  'sys_pop' => '3',
  'msg_timea' => '1500',
  'sys_map' => 'baidu',
  'sys_name' => 'Custmao(开心猫市)',
  'adm_mode' => 'expert',
  'close_home' => 'index',
  'close_chn' => '0',
  'close_mob' => '0',
  'close_dev' => '0',
  'login_dev' => '0',
  'tout_admin' => '1680',
  'tout_member' => '4',
  'show' => 
  array (
    'apsize' => '20',
    'mpsize' => '20',
    'fpsize' => '20',
    'ppsize' => '20',
  ),
  'mkv' => 
  array (
    'q' => 'tptag-tpls',
    'mkv' => 'tptag-tpls',
    'ua' => 
    array (
      'mkv' => 'tptag-tpls',
    ),
    'mod' => 'tptag',
    'key' => 'tpls',
    'view' => '',
    'type' => 'mtype',
    'hcfg' => 
    array (
      'vmode' => 'dynamic',
      'stext' => '.html',
      'stexp' => '2h',
      'imcfg' => 
      array (
      ),
      'etr' => '/demo.php',
    ),
    'vcfg' => 
    array (
      'vmode' => 'dynamic',
      'stext' => '.html',
      'stexp' => '2h',
    ),
    'tplname' => 'tptag/tpls',
  ),
) (line:76 {xvars}\ctpl\demo\tptag\tpls.cac_php)
[object] imcat\vopShow::__set_state(array(
   'vars' => 
  array (
  ),
   'tplCfg' => 
  array (
    'vdir' => 'demo',
    'tpc_on' => 0,
    'tpc_ext' => '.cac_php',
    'no_static' => '(adm)',
    'def_static' => 'comm',
    'mob_tpls' => '(mob,comm,ven,vfr,vru,ves)',
    'tplpend' => '',
    'tplpext' => '',
  ),
   'ucfg' => 
  array (
    'q' => 'tptag-tpls',
    'mkv' => 'tptag-tpls',
    'ua' => 
    array (
      'mkv' => 'tptag-tpls',
    ),
    'mod' => 'tptag',
    'key' => 'tpls',
    'view' => '',
    'type' => 'mtype',
    'hcfg' => 
    array (
      'vmode' => 'dynamic',
      'stext' => '.html',
      'stexp' => '2h',
      'imcfg' => 
      array (
      ),
      'etr' => '/demo.php',
    ),
    'vcfg' => 
    array (
      'vmode' => 'dynamic',
      'stext' => '.html',
      'stexp' => '2h',
    ),
    'tplname' => 'tptag/tpls',
  ),
   'err' => '',
   'pgflag' => 
  array (
  ),
   'pgbar' => 
  array (
  ),
   'mod' => 'tptag',
   'key' => 'tpls',
   'view' => '',
   'type' => 'mtype',
   'tplname' => 'tptag/tpls',
   'tplorg' => NULL,
   'tplnull' => NULL,
   'mkv' => 'tptag-tpls',
)) (line:76 {xvars}\ctpl\demo\tptag\tpls.cac_php)

扩展类库