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


PHP Debug::strictMode方法代码示例

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


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

示例1:

/**
 * My Application bootstrap file.
 *
 * @copyright  Copyright (c) 2010 John Doe
 * @package    MyApplication
 */
use Nette\Debug;
use Nette\Environment;
use Nette\Application\Route;
// Step 1: Load Nette Framework
// this allows load Nette Framework classes automatically so that
// you don't have to litter your code with 'require' statements
require LIBS_DIR . '/Nette/loader.php';
// Step 2: Configure environment
// 2a) enable Nette\Debug for better exception and error visualisation
Debug::$strictMode = TRUE;
Debug::enable();
// 2b) load configuration from config.ini file
Environment::loadConfig();
$config = Environment::getConfig();
// Step 3: Configure application
// 3a) get and setup a front controller
$application = Environment::getApplication();
$application->errorPresenter = 'Error';
//$application->catchExceptions = TRUE;
/**
 * Database connection
 */
Dibi::connect($config->database);
// Step 4: Setup application router
$router = $application->getRouter();
开发者ID:GymvodNette,项目名称:cv2-authentizace,代码行数:31,代码来源:bootstrap.php

示例2: function

use Nette\Debug;
use Nette\Environment as Env;
use Nette\Web\Html;



// Load libraries
require LIBS_DIR . '/Nette/loader.php';
require APP_DIR . '/routers/StaticRouter.php';
require APP_DIR . '/managers/PageManager.php';
require APP_DIR . '/classes/TemplateLocator.php';
require APP_DIR . '/classes/PresenterFactory.php';

// Enable and setup Nette\Debug
Debug::enable();
Debug::$strictMode = !Debug::$productionMode;

// Configure environment
date_default_timezone_set('Europe/Prague');
Html::$xhtml = FALSE;

// Configure application
$application = Env::getApplication();
$application->errorPresenter = 'Error';
$application->catchExceptions = Debug::$productionMode;

// Configure application context
$context = $application->getContext();
$context->addService('StaticWeb\\TemplateLocator', 'StaticWeb\\TemplateLocator');
$context->addService('StaticWeb\\PageManager', function() use ($context) {
	$manager = new PageManager();
开发者ID:JanTvrdik,项目名称:StaticWeb,代码行数:31,代码来源:bootstrap.php

示例3: proxy

/**
 * cURL Test bootstrap file.
 *
 * @copyright  Copyright (c) 2009 Filip Procházka
 * @package    Vdsc
 */
require_once dirname(__FILE__) . '/Nette/loader.php';
require_once dirname(__FILE__) . '/Curl/Request.php';
use Curl\Request;
use Curl\CurlException;
use Nette\Environment;
use Nette\Debug;
// register wrapper safe for file manipulation
Nette\SafeStream::register();
Debug::enable();
Debug::$strictMode = True;
Environment::loadConfig(realpath('./config.ini'));
$config = Environment::getConfig('curl');
$config['downloadFolder'] = realpath("download");
$config['cookieFile'] = $config['downloadFolder'] . '/cookies.tmp';
function proxy(&$test)
{
    // 	$test->addProxy('192.168.1.160', 3128);
}
if (TRUE) {
    // test 1: get
    $test = new Request("http://curl.kdyby.org/prevodnik.asm.zdrojak", $config);
    // 	$test = new Curl("http://iskladka.cz/iCopy/downloadBalancer.php?file=1222561395_obava_bojov+cz.avi&ticket=pc1660-1265493063.25");
    echo "<hr>test 1: get ... init ok<hr>", "<h2>Setup:</h2>";
    proxy($test);
    // for debbuging at school
开发者ID:pavelmaca,项目名称:cURL-wrapper,代码行数:31,代码来源:curl_test.php

示例4: Exception

 * @package    WRS
 */

use Nette\Debug;
use Nette\Environment;
use Nette\Application\SimpleRouter;

// Step 1: Load Nette Framework
// this allows load Nette Framework classes automatically so that
// you don't have to litter your code with 'require' statements
require_once LIBS_DIR . '/Nette/loader.php';


// Step 2: Configure environment
// 2a) enable Nette\Debug for better exception and error visualisation
Debug::$strictMode = true;
Debug::enable();

// 2b) load configuration from config.ini file
Environment::loadConfig();

// 2c) check if directory /app/temp is writable
if (@file_put_contents(Environment::expand('%tempDir%/_check'), '') === FALSE) {
	throw new Exception("Make directory '" . Environment::getVariable('tempDir') . "' writable!");
}

// 2d) setup sessions
//$session = Environment::getSession();
//$session->start();

// Step 3: Setup application router
开发者ID:norbe,项目名称:AutoUse,代码行数:31,代码来源:bootstrap.php


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