变量输出

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

自定义变量: test变量

当前模板目录:demo

当前模板:tptag/tpls

变量输出

项目路径:/custom

项目目录:/www/wwwroot/txjia.com/custom (完整)

视图目录:/www/wwwroot/txjia.com/custom/views (完整)

缓存目录:/www/wwwroot/txjia.com/custom/xvars/dtmp (完整)

第三方UI目录:/www/wwwroot/txjia.com/share_ximps/vendui (完整)

视图路径:/custom/views

缓存路径:/custom/xvars/dtmp

第三方UI路径:/share_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变量,全局可用) 1 >>> {xvars}/ctpl/demo/tptag/tpls.cac_php (76@dump),


[array:8] 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' => '', )
[array:7] array ( 'lang' => 'cn', 'sn' => '0BAB703D-127A-B479-1979-2010-0424X888', 'ver' => '1.0', 'cset' => 'utf-8', 'tmzone' => '8', 'tzcode' => 'PRC', 'xpwby' => '贴心猫(imcat)/v1.0', )
[array:27] array ( 'timer' => 1713972358.309663, 'memory' => 408056, 'aclass' => array ( 0 => '/core/blib/basDebug.php', 1 => '/core/blib/basEnv.php', 2 => '/core/blib/basArray.php', 3 => '/core/glib/glbConfig.php', 4 => '/core/glib/safComm.php', 5 => '/core/blib/basLang.php', 6 => '/core/vops/vopApp.php', 7 => '/core/vops/vopTpls.php', 8 => '/core/vops/vopUrl.php', 9 => '/core/vops/vopComp.php', 10 => '/core/clib/comFiles.php', 11 => '/core/blib/basStr.php', 12 => '/core/clib/comStore.php', 13 => '/core/vops/vopCTag.php', 14 => '/core/clib/comCookie.php', 15 => '/core/blib/basJscss.php', ), 'domain' => 'txjia.com', 'dmtop' => 'txjia.com', 'stamp' => 1713972358, 'userag' => 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', 'userip' => 'ra=18.222.69.152', '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' => '//txjia.com', 'rmain' => '//txjia.com/custom', 'roots' => '//txjia.com/custom/root', 'fbase' => '//txjia.com/custom/index.php', 'tplcfg' => array ( 0 => '示例版', 1 => '/demo.php', ), 'comp' => 'tptag/tpls', 'tpls' => array ( 0 => 'tptag/tpls', ), )
[array:3] array ( 'pre' => 'v48_', 'domain' => '', 'path' => '/', )
[array:12] 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', )
[array:3] array ( 'txmao' => 'http://txjia.com/imcat', 'txcode' => 'http://txjia.com/yscode', 'txjia' => 'http://txjia.com', )
[array:7] 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', )
[array:1] array ( 'debug' => true, )
[array:1] array ( 'tpldir' => '/comm/topic', )
[array:5] array ( 'name' => '语言', 'tab' => array ( ), 'def' => 'cn', 'mods' => array ( ), 'psyn' => array ( ), )
[string:4] 'kind'
[string:1] '4'
[string:1] '3'
[string:4] '1500'
[string:5] 'baidu'
[string:21] 'Custmao(开心猫市)'
[string:0] ''
[string:6] 'expert'
[string:5] 'index'
[string:1] '0'
[string:1] '0'
[string:1] '0'
[string:1] '0'
[string:4] '1680'
[string:1] '4'
[array:4] array ( 'apsize' => '20', 'mpsize' => '20', 'fpsize' => '20', 'ppsize' => '20', )
[array:10] array ( 'q' => 'tptag-tpls', 'mkv' => 'tptag-tpls', 'ua' => array ( 'tptag-tpls' => '', ), 'mod' => 'tptag', 'key' => 'tpls', 'view' => '', 'type' => 'mtype', 'hcfg' => array ( 'vmode' => 'dynamic', 'stext' => '.html', 'stexp' => '2h', 'imcfg' => array ( ), 'etr' => '/custom/demo.php', ), 'vcfg' => array ( 'vmode' => 'dynamic', 'stext' => '.html', 'stexp' => '2h', ), 'tplname' => 'tptag/tpls', )
1 >>> {xvars}/ctpl/demo/tptag/tpls.cac_php (76@dump),

[object] imcat\vopApp::__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 ( 'tptag-tpls' => '', ), 'mod' => 'tptag', 'key' => 'tpls', 'view' => '', 'type' => 'mtype', 'hcfg' => array ( 'vmode' => 'dynamic', 'stext' => '.html', 'stexp' => '2h', 'imcfg' => array ( ), 'etr' => '/custom/demo.php', ), 'vcfg' => array ( 'vmode' => 'dynamic', 'stext' => '.html', 'stexp' => '2h', ), 'tplname' => 'tptag/tpls', ), 'err' => '', 'pgflag' => array ( ), 'pgbar' => array ( ), 'mkv' => 'tptag-tpls', 'mod' => 'tptag', 'key' => 'tpls', 'view' => '', 'type' => 'mtype', 'tplname' => 'tptag/tpls', 'tplorg' => NULL, 'tplnull' => NULL, ))

扩展类库