当前位置: 首页>>代码示例>>PHP>>正文


PHP app::run方法代码示例

本文整理汇总了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;
 }
开发者ID:highestgoodlikewater,项目名称:spider-3,代码行数:11,代码来源:console.php

示例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();
 }
开发者ID:qhdyym,项目名称:PHPEMS,代码行数:12,代码来源:api.cls.php

示例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();
 }
开发者ID:knowsee,项目名称:uoke_framework,代码行数:14,代码来源:newAutoModel.class.php

示例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;
 }
开发者ID:pumpinger,项目名称:EZPHPdev,代码行数:18,代码来源:EZPHP.class.php

示例5: date_default_timezone_set

<?php

require 'core/app.php';
date_default_timezone_set("PRC");
app::init();
app::run();
开发者ID:Cheuk1991,项目名称:DuPHP,代码行数:6,代码来源:index.php

示例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);
     }
 }
开发者ID:highestgoodlikewater,项目名称:spider-3,代码行数:12,代码来源:core.php

示例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();
开发者ID:vgalitsky,项目名称:moze,代码行数:11,代码来源:index.php

示例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
开发者ID:q4z1,项目名称:pokerth_monthlycup,代码行数:31,代码来源:index.php

示例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);
开发者ID:parsinegar2015,项目名称:parsinegar,代码行数:31,代码来源:article.php

示例10: task2

 /**
  * 每日执行
  */
 function task2()
 {
     $this->funddividend();
     //分红同步
     $this->resolution();
     //拆分同步
     app::run(array('bond', 'index'));
     //中证全债数据抓取
 }
开发者ID:hzgswangy,项目名称:finance_warehouse,代码行数:12,代码来源:mssql.php

示例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();
开发者ID:akirafreak,项目名称:php-image-host,代码行数:31,代码来源:index.php


注:本文中的app::run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。