本文整理汇总了PHP中Routes::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Routes::init方法的具体用法?PHP Routes::init怎么用?PHP Routes::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Routes
的用法示例。
在下文中一共展示了Routes::init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
<?php
include 'config/routes.php';
define("APP_PREFIX", "/electiva_php_ude_2015");
Routes::init();
示例2: Routes
require_once INCLUDES_DIR . '/config.php';
require_once INCLUDES_DIR . '/functions.php';
//You can use functions.php for custom functions. (Not required unless you want to use custom functions)
require_once CLASSES_DIR . '/routes.class.php';
require_once CLASSES_DIR . '/core.class.php';
require_once CLASSES_DIR . '/custom.class.php';
//You can use custom.class.php for custom classes. (Not required unless you want to use custom classes)
class DB extends Database_Base
{
}
$PageTitle = '';
$MetaDescription = '';
$MetaKeywords = '';
$pathfile = '';
$routes = new Routes();
$routes->init();
$use404 = false;
if (isset($routes->error)) {
if ($debug) {
echo $routes->error;
} else {
$use404 = true;
$PageTitle = DEFAULT_SITE_NAME . ' - Error 404 - Page Not Found';
}
}
if (!$use404) {
$url = $routes->url;
$pathfile = $routes->pathfile;
$params = $routes->params;
if ($url == '' || $url == '/') {
$pathfile = 'main';