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


PHP Debugger::setMode方法代码示例

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


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

示例1: define

define('SYS_TEMPLATES', SYS_VIEWS . '/Templates');
define('SYS_REQUEST', 'Request');
define('SYS_RESPONSE', 'Response');
define('SYS_UTILS', 'utils');
//define('SYS_DEFAULT_CONTROLLER', SYS_CONTROLLERS . '/Default_Controller.php');

// Include necessary app files
include_once($appPath . DIRECTORY_SEPARATOR . "Debugger.php");
include_once($appPath . DIRECTORY_SEPARATOR . SYS_ROUTER . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . SYS_ROUTES . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . SYS_REGISTRY . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . SYS_REQUEST . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . SYS_RESPONSE . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . SYS_UTILS . ".php");
// Set Debugger
Debugger::setMode(SYS_DEBUG);

// Instantiate Router and set routes
$routerName = SYS_ROUTER;
$routes = SYS_ROUTES;
$router = new $routerName;
$routes::addRoutes($router);
$url = $_SERVER['REQUEST_URI'];
$routeData = $router->getRoute($url);
$responseName = SYS_RESPONSE;
$response = new $responseName;
$file = SYS_CONTROLLERS . DIRECTORY_SEPARATOR . ucfirst($routeData['controller']) . "_" . "Controller.php";
$className = ucfirst($routeData['controller']) . "_" . "Controller";
$modelClassName = ucfirst($routeData['controller']);
$action = 'action_' . $routeData['action'];
$controller = $routeData['controller'];
开发者ID:GraphicLingoes,项目名称:codesamples,代码行数:31,代码来源:index.php

示例2: define

define('API_USER_STYLESHEETS', $appPath . DIRECTORY_SEPARATOR . 'user_content' . DIRECTORY_SEPARATOR . 'css');
define('API_RESPONSE', 'Response');
define('API_UTILS', 'utils');
define('SYS_VIEWS', $apiPath . '/views');
define('SYS_TEMPLATES', SYS_VIEWS . '/Templates');

// Include necessary app files
include_once($appPath . DIRECTORY_SEPARATOR . "Debugger.php");
include_once($appPath . DIRECTORY_SEPARATOR . API_ROUTER . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . API_ROUTES . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . API_REGISTRY . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . API_REQUEST . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . API_RESPONSE . ".php");
include_once($appPath . DIRECTORY_SEPARATOR . API_UTILS . ".php");
// Set Debugger
Debugger::setMode(API_DEBUG);
// Instantiate Router and set routes
$routerName = API_ROUTER;
$routes = API_ROUTES;
$router = new $routerName;
$responseName = API_RESPONSE;
$response = new $responseName;
$routes::addRoutes($router);
$url = $_SERVER['REQUEST_URI'];
$routeData = $router->getRoute($url);
$file = API_CONTROLLERS_PATH . DIRECTORY_SEPARATOR . ucfirst($routeData['controller']) . "_" . "Controller.php";
$className = ucfirst($routeData['controller']) . "_" . "Controller";
$modelClassName = ucfirst($routeData['controller']);
$action = 'action_' . $routeData['action'];
$controller = $routeData['controller'];
开发者ID:GraphicLingoes,项目名称:codesamples,代码行数:30,代码来源:index.php


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