[搜]

贴心猫-文档

获取post|get值

    $mod = req('mod','','Key'); //获取post,get的mod值
    $fm = basReq::ark('fm'); //获取post,get的fm数组
    $kid = basReq::ark('fm','kid','Key'); //获取post,get的fm数组下的kid键值

常用的常量

  • _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', 1); // RUN_ADMIN/RUN_UMC
    define('RUN_FRONT', 1); // RUN_FRONT, RUN_MOB, RUN_APP, RUN_APP, RUN_DEV
    define('RUN_STATIC', 1);
    define('RUN_JSHOW', 1);
    define('RUN_COMSADD', 1);

多语言调用

  • 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')

常用变量|对象

    global $_cbase,
    $_groups = read('groups');
    $db = db();
    $user = user('Member'); //Member,Admin
    $user = user(); 
    basDebug::bugLogs('test1',"msg");

终止操作

    die('No Init'); 
    vopApp::msg("[$key][type]参数错误!");    
    basMsg::show('请选择操作!','die');
    glbHtml::page('end,$msg);
    echo basDebug::runInfo();