
#define#Constants

- Constants in _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
```

- Constants in [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);
```

#comfuncs#Functions/Alias

```
    // (Format show Vars,Array,Object)
    dump($var);
    = basDebug::varShow($var);

    // (Read cbase Configs) cfg('sys.cset');
    cfg($key,$defval);

    // (Show Lang Lables)
    lang($mk, $val);
    = basLang::show($mk, $val);

    // (Read Model Cache)
    read($file,$dir,$type);
    = glbConfig::read($file,$dir,$type);

    // (get/post params)
    req($key,$def,$type,$len);
    = basReq::val($key,$def,$type,$len);

    // (Get db Object)
    db($config);
    = glbDBObj::dbObj($config);

    // (Get user Object)
    user($uclass);
    = usrBase::userObj($uclass);

    // Format show url
    surl($mkv,$type,$host);
    = vopUrl::fout($mkv,$type,$host);

```

#getpost#post/get values

```
    $mod = req('mod','','Key'); //Get value(mod) from post/get
    $fm = basReq::ark('fm'); //Get value(fm-array) from post/get
    $kid = basReq::ark('fm','kid','Key'); //Get a key(in fm-array) from post/get
```

#mlang#Multi-language

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

#varobj#Variable/object

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

#endcode#Exit operation

```
    die('No Init'); 
    vopShow::msg("[$key][type]Param Error!");    
    basMsg::show('Plesse select an operation!','die');
    glbHtml::page('end,$msg);

    echo basDebug::runInfo(); 
```

