本文整理汇总了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();