public function my() { if ($GLOBALS['TS_USER']) { include 'app/' . $GLOBALS['TS_URL']['app'] . '/my.' . $GLOBALS['TS_URL']['app'] . '.php'; $appMy = $GLOBALS['TS_URL']['app'] . 'My'; $newMy = new $appMy($GLOBALS['db']); $newMy->{$GLOBALS}['TS_URL']['my'](); } else { ts404(); } }
} } } } //运行统计结束 $time_end = getmicrotime(); $runTime = $time_end - $time_start; $TS_CF['runTime'] = number_format($runTime, 6); //定义全局变量 global $TS_CF, $TS_SITE, $TS_APP, $TS_USER, $TS_URL, $TS_MC, $db, $tsMySqlCache; //装载APP应用 if (is_file('app/' . $TS_URL['app'] . '/class.' . $TS_URL['app'] . '.php')) { include_once 'app/' . $TS_URL['app'] . '/class.' . $TS_URL['app'] . '.php'; $new[$TS_URL['app']] = new $TS_URL['app']($db); //在执行action之前加载 doAction('beforeAction'); //全站通用数据加载 include 'thinksaas/common.php'; if (is_file('app/' . $TS_URL['app'] . '/action.' . $TS_URL['app'] . '.php')) { //面向对象的写法 include_once 'app/' . $TS_URL['app'] . '/action.' . $TS_URL['app'] . '.php'; $appAction = $TS_URL['app'] . 'Action'; $newAction = new $appAction($db); $newAction->{$TS_URL}['ac'](); } else { //面向目录和文件的逻辑加载写法 include 'app.php'; } } else { ts404(); }