本文整理汇总了PHP中GWF_Website::init方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_Website::init方法的具体用法?PHP GWF_Website::init怎么用?PHP GWF_Website::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_Website
的用法示例。
在下文中一共展示了GWF_Website::init方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($basepath = NULL, array $config = array())
{
self::init($basepath);
self::onDefineWebRoot();
GWF_Language::initEnglish();
GWF_Website::init(false);
}
示例2: header
<?php
header('Content-Type: text/plain');
chdir('../../../../');
define('GWF_PAGE_TITLE', 'The Travelling Customer');
require_once 'challenge/gwf_include.php';
GWF_Website::init(getcwd());
require_once 'challenge/training/programming/knapsaak/salesman.php';
$wechall = GWF_Module::loadModuleDB('WeChall', true, true);
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 4, 'challenge/training/programming/knapsaak/index.php');
}
echo salesman_on_submit_answer($chall);
//GWF_Session::commit();
示例3: init
/**
* Initialize by ConfigOptions
* @return GWF3
*/
public function init()
{
$config =& self::$CONFIG;
if (true === $config['start_debug']) {
GWF_Debug::enableErrorHandler();
GWF_Debug::setMailOnError((GWF_DEBUG_EMAIL & 2) > 0);
}
if (true === $config['kick_banned_ip']) {
$this->onKickBannedIP();
}
if (true === defined('GWF_WEBSITE_DOWN')) {
$this->setConfig('load_module', false);
$this->setConfig('autoload_modules', false);
$this->setConfig('no_session', true);
}
// $db = gdo_db();
if (false === $config['no_session']) {
$this->onStartSession($config['blocking']);
}
if (true === $config['website_init']) {
$db = gdo_db();
GWF_Website::init();
}
if (true === $config['do_logging']) {
$this->onStartLogging($config['no_session']);
}
if (true === $config['autoload_modules']) {
$this->onAutoloadModules();
}
if (true === $config['get_user']) {
GWF_Template::addMainTvars(array('user' => self::$user = GWF_User::getStaticOrGuest()));
}
if (true === $config['load_module']) {
$this->onLoadModule();
}
if (true === defined('GWF_WEBSITE_DOWN')) {
die($this->onDisplayPage(GWF_WEBSITE_DOWN));
}
return $this;
}