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


PHP http::trimRequest方法代码示例

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


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

示例1: define

if (!defined('DC_UPDATE_VERSION')) {
    define('DC_UPDATE_VERSION', 'stable');
}
try {
    $core = new dcCore(DC_DBDRIVER, DC_DBHOST, DC_DBNAME, DC_DBUSER, DC_DBPASSWORD, DC_DBPREFIX, DC_DBPERSIST);
} catch (Exception $e) {
    __error($e->getMessage(), $e->getCode() == 0 ? '<p>This either means that the username and password information in ' . 'your <strong>config.php</strong> file is incorrect or we can\'t contact ' . 'the database server at "<em>' . DC_DBHOST . '</em>". This could mean your ' . 'host\'s database server is down.</p> ' . '<ul><li>Are you sure you have the correct username and password?</li>' . '<li>Are you sure that you have typed the correct hostname?</li>' . '<li>Are you sure that the database server is running?</li></ul>' . '<p>If you\'re unsure what these terms mean you should probably contact ' . 'your host. If you still need help you can always visit the ' . '<a href="http://forum.dotclear.net/">Dotclear Support Forums</a>.</p>' : '', 20);
}
# If we have some __top_behaviors, we load them
if (isset($__top_behaviors) && is_array($__top_behaviors)) {
    foreach ($__top_behaviors as $b) {
        $core->addBehavior($b[0], $b[1]);
    }
    unset($b);
}
http::trimRequest();
try {
    http::unsetGlobals();
} catch (Exception $e) {
    header('Content-Type: text/plain');
    echo $e->getMessage();
    exit;
}
l10n::init();
$core->url->registerDefault(array('dcUrlHandlers', 'home'));
$core->url->register('lang', '', '^([a-zA-Z]{2}(?:-[a-z]{2})?(?:/page/[0-9]+)?)$', array('dcUrlHandlers', 'lang'));
$core->url->register('post', 'post', '^post/(.+)$', array('dcUrlHandlers', 'post'));
$core->url->register('preview', 'preview', '^preview/(.+)$', array('dcUrlHandlers', 'preview'));
$core->url->register('category', 'category', '^category/(.+)$', array('dcUrlHandlers', 'category'));
$core->url->register('archive', 'archive', '^archive(/.+)?$', array('dcUrlHandlers', 'archive'));
$core->url->register('feed', 'feed', '^feed/(.+)$', array('dcUrlHandlers', 'feed'));
开发者ID:HackerMajor,项目名称:root,代码行数:31,代码来源:prepend.php


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