本文整理汇总了PHP中IUrl::beginUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP IUrl::beginUrl方法的具体用法?PHP IUrl::beginUrl怎么用?PHP IUrl::beginUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IUrl
的用法示例。
在下文中一共展示了IUrl::beginUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execRequest
/**
* @brief 请求执行方法,是application执行的入口方法
*/
public function execRequest()
{
IUrl::beginUrl();
$this->controller = $this->createController();
IInterceptor::run("onCreateController");
$this->controller->run();
IInterceptor::run("onFinishController");
}
示例2: execRequest
/**
* @brief 请求执行方法,是application执行的入口方法
*/
public function execRequest()
{
echo IWeb::exeTime() . "<br><br><br>";
IUrl::beginUrl();
$this->controller = $this->createController();
IInterceptor::run("onCreateController", $this->controller);
$this->controller->run();
IInterceptor::run("onFinishController");
}
示例3: run
public function run($setindex = '')
{
IUrl::beginUrl();
$controller = IUrl::getInfo('controller');
$action = IUrl::getInfo('action');
$Taction = empty($action) ? $this->defaultAction : $action;
$info = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '');
$sitekey = isset($this->config['sitekey']) ? $this->config['sitekey'] : '';
//if ($this->getkey() != $sitekey) {
// echo 'error! 关注好资源222-www.mx800.com';
// exit();
//}
/*
$hostcheck = array('wmr.xiaoshuhaochi.com', 'wmr.xiaoshuhaochi.com', 'xiaoshuhaochi.com');
if (!in_array($info, $hostcheck)) {
echo 'error! 关注好资源111-www.mx800.com';
exit();
}*/
if ($controller === NULL) {
$controller = $this->defaultController;
}
$this->controller = $controller;
$this->Taction = $Taction;
if ($controller == 'site' && $Taction == 'index') {
if (is_mobile_request()) {
$this->controller = 'html5';
}
}
spl_autoload_register('Mysite::autoload');
$filePath = hopedir . '/lib/Smarty/libs/Smarty.class.php';
if (!class_exists('smarty')) {
include_once $filePath;
}
if ($controller == 'adminpage') {
$smarty = new Smarty();
$smarty->assign('siteurl', Mysite::$app->config['siteurl']);
$smarty->cache_lifetime = 0;
$smarty->caching = false;
$smarty->template_dir = hopedir . '/templates/';
$smarty->compile_dir = hopedir . '/templates_c/adminpage';
$smarty->cache_dir = hopedir . '/smarty_cache';
$smarty->left_delimiter = '<{';
$smarty->right_delimiter = '}>';
$module = IUrl::getInfo('module');
$module = empty($module) ? 'index' : $module;
$doaction = Mysite::$app->getAction() == 'index' ? 'system' : Mysite::$app->getAction();
$this->Taction = $doaction;
$this->siteset();
if (!file_exists(hopedir . '/module/' . Mysite::$app->getAction() . '/adminmethod.php')) {
} else {
include hopedir . '/module/' . Mysite::$app->getAction() . '/adminmethod.php';
$method = new method();
$method->init();
if (method_exists($method, $module)) {
call_user_func(array($method, $module));
}
}
$datas = $this->getdata();
if (is_array($datas)) {
foreach ($datas as $key => $value) {
$smarty->assign($key, $value);
}
}
$nowID = ICookie::get('myaddress');
$lng = ICookie::get('lng');
$lat = ICookie::get('lat');
$mapname = ICookie::get('mapname');
$adminshopid = ICookie::get('adminshopid');
$smarty->assign('myaddress', $nowID);
$smarty->assign('mapname', $mapname);
$smarty->assign('adminshopid', $adminshopid);
$smarty->assign('lng', $lng);
$smarty->assign('lat', $lat);
$smarty->assign('controlname', Mysite::$app->getController());
$smarty->assign('Taction', Mysite::$app->getAction());
$smarty->assign('urlshort', Mysite::$app->getController() . '/' . Mysite::$app->getAction());
$templtepach = hopedir . '/templates/adminpage/' . Mysite::$app->getAction() . '/' . $module . '.html';
if (file_exists($templtepach)) {
} else {
if (file_exists(hopedir . '/module/' . Mysite::$app->getAction() . '/adminpage/' . $module . '.html')) {
$smarty->compile_dir = hopedir . '/templates_c/adminpage/' . Mysite::$app->getAction();
$templtepach = hopedir . '/module/' . Mysite::$app->getAction() . '/adminpage/' . $module . '.html';
} else {
logwrite('模板不存在 ');
$smarty->assign('msg', '模板文件不存在');
$smarty->assign('sitetitle', '错误提示');
$errorlink = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
$smarty->assign('errorlink', $errorlink);
$templtepach = hopedir . '/templates/adminpage/public/error.html';
}
}
$smarty->assign('tmodule', $module);
$smarty->assign('tempdir', 'adminpage');
$smarty->registerPlugin('function', 'ofunc', 'FUNC_function');
$smarty->registerPlugin('block', 'oblock', 'FUNC_block');
$smarty->display($templtepach);
exit;
} else {
$smarty = new Smarty();
//.........这里部分代码省略.........