本文整理汇总了PHP中Sample::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP Sample::execute方法的具体用法?PHP Sample::execute怎么用?PHP Sample::execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sample
的用法示例。
在下文中一共展示了Sample::execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
$DIR_SCRIPT = dirname(__FILE__);
$DIR_ROOT = "{$DIR_SCRIPT}/..";
$DIR_LIB = "{$DIR_ROOT}/lib";
# No need to add the Madcow library directory to the PHP include
# path if Madcow is properly installed in the systems include path.
$MADCOW_LIB = "{$DIR_ROOT}/..";
$DIR_LIB = "{$DIR_LIB}:{$MADCOW_LIB}";
set_include_path($DIR_LIB . ':' . get_include_path());
require_once 'DF/Web/Logger.php';
DF_Web_Logger::setActiveLogger('error_log');
require_once 'Sample.php';
$environment = DF_Web_Environment::singleton();
$environment->app_root = $DIR_ROOT;
$environment->trusted_proxies = 0;
$environment->base_path = dirname($_SERVER['SCRIPT_NAME']);
if (getenv('ENVIRONMENT')) {
$environment->environment = getenv('ENVIRONMENT');
}
$environment->debug = 1;
# for production
#$environment->environment = 'production';
#$environment->debug = 0;
$context = new Sample();
$context->execute();
$context->finalize();
$context = NULL;
DF_Web_Logger::shutdown();