• 贴心猫(imcat) 常用的常量 --- [Top]
    • ● _paths.php定义的常量
        RUN_INIT, DIR_PROJ, PATH_PROJ
        DIR_IMCAT, DIR_ROOT/PATH_ROOT
        DIR_VARS/PATH_VARS: *_URES, *_HTML, *_DTMP
        DIR_IMPS/PATH_IMPS: *_VENDOR, *_VENDUI, *_STATIC
    • ● [root]/run/下入口文件常量
        define('RUN_ADMIN,RUN_UMC', 1);
        define('FRONT,MOB,APP,DEV', 1)
        define('RUN_STATIC', 1);
        define('RUN_JSHOW', 1);
        define('RUN_COMSADD', 1);
  • 贴心猫(imcat) 常用函数/别名 --- [Top]
  •     // (格式化输出:变量,数组,Object)
        dump($var);
        = basDebug::varShow($var);
    
        // (读取cbase配置) cfg('sys.cset'); 
        cfg($key,$defval);
    
        // (显示语言标识)
        lang($mk, $val);
        = basLang::show($mk, $val);
    
        // (读取缓存)
        read($file,$dir,$type);
        = glbConfig::read($file,$dir,$type);
    
        // (获得get/post参数)
        req($key,$def,$type,$len);
        = basReq::val($key,$def,$type,$len);
    
        // (获得db对象)
        db($config);
        = glbDBObj::dbObj($config);
    
        // (获得user对象)
        user($uclass);
        = usrBase::userObj($uclass);
    
        // 格式化url输出
        surl($mkv,$type,$host);
        = vopUrl::fout($mkv,$type,$host);
    
  • 贴心猫(imcat) 获取post,get值 --- [Top]
  •     $mod = req('mod','','Key'); //获取post,get的mod值
        $fm = basReq::ark('fm'); //获取post,get的fm数组
        $kid = basReq::ark('fm','kid','Key'); //获取post,get的fm数组下的kid键值
  • 贴心猫(imcat) Lang-多语言调用 --- [Top]
    • ● php
        -> basLang::show('core.page_First')
        -> lang('admin.adm_center')
        -> <?php lang('tools.start_setup',0) ?>
    • ● tpl
        -> {lang(core.view_times,$click)}
        -> {lang(core.sys_name)}
    • ● js
        -> lang('jcore.sub_key')
  • 贴心猫(imcat) 常用变量,对象 --- [Top]
  •     global $_cbase,
        $_groups = read('groups');
        $db = db();
        $user = user('Member'); //Member,Admin
        $user = user(); 
        basDebug::bugLogs('test1',"msg");
  • 贴心猫(imcat) 终止操作 --- [Top]
  •     die('No Init'); 
        vopShow::msg("[$key][type]参数错误!");    
        basMsg::show('请选择操作!','die');
        glbHtml::page('end,$msg);
    
        echo basDebug::runInfo(); 

提示:`/dev.php`入口为贴心猫中文文档;欢迎进入`问答`交流使用经验!

QQ群:607070548; Copyright © 2011-2018 txjia.com All rights reserved.

Run:0.000/22.491(ms); 0(sql)/1.957(MB); dev:c_demo/dev2nd_basic; Upd:2024-11-15 17:19:22