Beispiel #1
0
<?php

/**
 * @name sampleScript
 * @desc 示例脚本
 * @author 符广森(fuguangsen@baidu.com)
 */
Bd_Init::init();
//主体功能逻辑写在这里
echo 'Hello, sample script running...';
//如果利用noah ct任务系统运行脚本,需要显示退出,设置退出码为0,否则监控系统会报警
exit(0);
Beispiel #2
0
<?php

/**
 * @name index
 * @desc 入口文件
 * @author dengfangyuan01@baidu.com
 */
try {
    $objApplication = Bd_Init::init();
    $objResponse = $objApplication->bootstrap()->run();
} catch (Exception $ex) {
    $code = $ex->getCode();
    $msg = $ex->getMessage();
    Bd_Log::warning(sprintf("CLASS[%s] get exception err[%d] msg[%s] file[%s] line[%d]", __FILE__, $code, $msg, $ex->getFile(), $ex->getLine()));
    header('Location: http://map.baidu.com/static/waimai/error/index.html');
}