本文整理匯總了PHP中app::run方法的典型用法代碼示例。如果您正苦於以下問題:PHP app::run方法的具體用法?PHP app::run怎麽用?PHP app::run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app
的用法示例。
在下文中一共展示了app::run方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isLogin
private static function isLogin()
{
if (!($userid = session_get('USERID'))) {
if (Request::isAjax()) {
exit(json_encode(array('code' => -1, 'msg' => 'please login')));
} else {
exit(app::run(array('home', 'page', 'login')));
}
}
return $userid;
}
示例2: run
public function run()
{
$ev = $this->make('ev');
include '../lib/config.inc.php';
header('P3P: CP=CAO PSA OUR');
header('Content-Type: text/html; charset=' . HE);
ini_set('date.timezone', 'Asia/Shanghai');
date_default_timezone_set("Etc/GMT-8");
error_reporting(0);
$app = new app($this);
$app->run();
}
示例3: uoke
public static function uoke()
{
self::coreRun();
if (DEBUGSET == 1) {
error_reporting(E_ERROR);
} elseif (DEBUGSET == 2) {
error_reporting(E_ALL);
} else {
error_reporting(0);
}
ob_start();
helper_log::runLog();
app::run();
}
示例4: init
public static function init($userConfig)
{
// spl_autoload_register('EZPHP\EZPHP::autoLoad');
spl_autoload_register(array('EZPHP\\EZPHP', 'autoLoad'));
set_error_handler('EZPHP\\EZPHP::appError');
set_exception_handler('EZPHP\\EZPHP::appException');
register_shutdown_function('EZPHP\\EZPHP::appEnd');
//trigger_error("what ?",E_USER_ERROR);
//throw new EZException('111');
//obstart
global $defaultConfig;
global $config;
$config = array_merge($defaultConfig, $userConfig);
dev::start();
app::run($config);
dev::end();
EZPHP::$success_end = true;
}
示例5: date_default_timezone_set
<?php
require 'core/app.php';
date_default_timezone_set("PRC");
app::init();
app::run();
示例6: runRouter
public static function runRouter($router)
{
if (count($router) == 1) {
$router[] = DEFAULT_ACTION;
}
$GLOBALS['APP']['router'] = $router;
if (is_object($router[1])) {
return call_user_func_array($router[1], array_slice($router, 2));
} else {
app::run($router);
}
}
示例7: app
<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
require_once 'app/core/const.php';
require_once 'app/core/autoload.php';
require_once 'config.php';
require_once "app/app.php";
/** @var app $app */
$app = new app($___config);
$app->run();
示例8: substr
}
/*
* prüfe auf "?"-GET Variablen:
*/
if (strrpos($_SERVER['REQUEST_URI'], "?") !== false) {
$request['uri'] = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], "?"));
} else {
$request['uri'] = $_SERVER['REQUEST_URI'];
}
"(" . __FILE__ . "): REQUEST_URI und GET/POST ausgelesen:<br />" . "\$request:<br /><pre>" . var_export($request, true) . "</pre>";
}
/*
* run application
*/
try {
app::run($request);
} catch (Exception $exception) {
/*
* lade exception controller
*/
$e = new controller_exceptionhandler();
$e->run($exception);
}
exit;
/*
* Ende Ablauf index.php
**/
/**
* __autoload($class_name)
*
* autmatisches Laden von Klassen
示例9: array
$opt['title'] = $row['title'];
$opt['title2'] = $row['title_en'];
$opt['min_ckeditor'] = $row['content'];
$opt['keywords'] = $row['keyword'];
$opt['journal'] = $row['journal_name'];
$opt['more_authors'] = $row['more_authors'];
$opt['file'] = $row['file'];
$opt['link'] = $row['link'];
if ($row['lang'] == 'en') {
$opt['title'] = $row['title_en'];
$opt['title2'] = $row['title'];
$opt['min_ckeditor'] = $row['content_en'];
$opt['keywords'] = $row['keyword_en'];
}
#CALL ADD FUNCTION
app::run(app::$ROUTE_GET, array('do' => 'add'), array($opt));
}
}
});
$app->getDO('delete', ['auth_login' => true, 'get_token' => 'auth_token', validRequest() => true], function () use($pdo) {
if (isset($_GET['article']) && intval($_GET['article'])) {
$sql = "delete from article where id=:id";
if ($_SESSION['permission'] != 'admin') {
$sql = $sql . " and status=0 and uid=" . $_SESSION['userId'];
}
$stmt = $pdo->prepare($sql);
$stmt->bindvalue(':id', filter_var($_GET['article'], FILTER_SANITIZE_STRING), PDO::PARAM_INT);
$affected_rows = $stmt->execute();
_log('info_delete', $affected_rows . ' row(s) of records deleted', 'article=' . $_GET['article']);
}
redirect(BACK_ADDRESS, 1);
示例10: task2
/**
* 每日執行
*/
function task2()
{
$this->funddividend();
//分紅同步
$this->resolution();
//拆分同步
app::run(array('bond', 'index'));
//中證全債數據抓取
}
示例11: files
<?php
/*
PHP Image Host
www.phpace.com/php-image-host
Copyright (c) 2004,2008,2009 Sam Yapp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
// turn full error reporting on / off
error_reporting(E_ALL ^ E_NOTICE);
// define this to stop other files being included when they shouldnt
define('PIH', true);
// include configuration / initialization options
require_once dirname(__FILE__) . '/classes/app.class.php';
$app = new app();
$app->run(isset($_REQUEST['cmd']) ? $_REQUEST['cmd'] : 'index');
echo $app->theme->renderTheme();