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


PHP application::run方法代码示例

本文整理汇总了PHP中application::run方法的典型用法代码示例。如果您正苦于以下问题:PHP application::run方法的具体用法?PHP application::run怎么用?PHP application::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在application的用法示例。


在下文中一共展示了application::run方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 /**
  * 运行HD框架产品 
  */
 public static function run()
 {
     if (self::$is_run) {
         return;
     }
     self::$is_run = true;
     self::$compile = defined("COMPILE") ? COMPILE : true;
     self::Definition();
     //配置系统常量
     self::$boot = PATH_TEMP . '/boot.php';
     //核心编译文件
     if (self::$compile && is_file(self::$boot)) {
         require self::$boot;
         //如果编译文件存在加载核心编译文件boot.php
         application::run();
         //运行应用目录下的项目
         return;
     }
     self::compileCoreFile();
     //编译生成核心文件boot.php
     application::run();
     //运行应用目录下的项目
 }
开发者ID:com-itzcy,项目名称:hdjob,代码行数:26,代码来源:hdphp.php

示例2: elseif

        } elseif (file_exists(DIR_TEMPLATES . $fake_doc . ".html")) {
            $app->action = $fake_doc;
        } else {
            //$tmp1=SQLSelectOne("SELECT ID FROM cms_docs WHERE NAME='404'");
            $tmp1 = array();
            if ($tmp1['ID']) {
                $app->action = "docs";
                $app->doc = $tmp1['ID'];
            } else {
                header("HTTP/1.0 404 Not Found");
                echo "The page cannot be found. Please use <a href='/'>this link</a> to continue browsing.";
                exit;
            }
        }
    }
    $result = $app->run();
    $result = str_replace("nf.php", "index.php", $result);
} else {
    // show cached result
    $result = $cached_result;
}
// BEGIN: begincut endcut placecut
if (preg_match_all('/<!-- placecut (\\w+?) -->/is', $result, $matches)) {
    for ($i = 0; $i < count($matches[1]); $i++) {
        $block = $matches[1][$i];
        if (preg_match('/<!-- begincut ' . $block . ' -->(.*?)<!-- endcut ' . $block . ' -->/is', $result, $matches2)) {
            $result = str_replace($matches[0][$i], $matches2[1], $result);
            $result = str_replace($matches2[0], '', $result);
        }
    }
}
开发者ID:vasvlad,项目名称:majordomo,代码行数:31,代码来源:index.php

示例3: define

<?php

defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'), get_include_path())));
require_once 'application.php';
$application = new application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
$application->run();
开发者ID:nazart,项目名称:itera,代码行数:10,代码来源:index.php

示例4: microtime

// benchmark
$benchmark = microtime(true);
// parameters
$type = $argv[1];
$mode = $argv[2];
chdir('public_html');
// autoloading composer first
if (file_exists('../libraries/vendor/autoload.php')) {
    require '../libraries/vendor/autoload.php';
}
// automatic class loading
require '../libraries/vendor/numbers/framework/application.php';
spl_autoload_register(array('application', 'autoloader'));
// running application
application::run(['__run_only_bootstrap' => 1]);
// increase in memory and unlimited execution time
ini_set('memory_limit', '2048M');
set_time_limit(0);
// wrapping everything into try-catch block for system exceptions
try {
    // running proper class
    switch ($type) {
        case 'deploy':
            $result = system_deployments::deploy(['mode' => $mode]);
            break;
        case 'schema':
            $result = system_dependencies::process_models(['mode' => $mode]);
            // we need to reset all caches
            if ($mode == 'commit') {
                $cache = factory::get(['cache']);
开发者ID:volodymyr-volynets,项目名称:framework,代码行数:30,代码来源:manager.php

示例5: run

 public static function run($applicationClass)
 {
     application::run($applicationClass);
 }
开发者ID:ExceptVL,项目名称:kanon,代码行数:4,代码来源:kanon.php

示例6: define

<?php

define('IN_ADMIN', true);
define('ROOT_PATH', dirname($_SERVER['SCRIPT_FILENAME']) . '/');
$basename = basename($_SERVER['SCRIPT_FILENAME']);
$basename = explode('.', $basename);
define('CURSCRIPT', reset($basename));
include ROOT_PATH . 'inc/class/application.class.php';
application::init();
application::run();
开发者ID:sayi21cn,项目名称:ttae_open,代码行数:10,代码来源:admin.php


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