本文整理汇总了PHP中request::uri方法的典型用法代码示例。如果您正苦于以下问题:PHP request::uri方法的具体用法?PHP request::uri怎么用?PHP request::uri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类request
的用法示例。
在下文中一共展示了request::uri方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setURIChunks
private static function _setURIChunks()
{
if (!isset(self::$uri)) {
$str = substr(SITE_URL, strlen(SITE_SERVER_URL) + 1);
self::$uri = array();
if ($str) {
self::$uri = explode('/', $str);
}
if (self::$uri) {
$_REQUEST = array_merge($_REQUEST, self::$uri);
}
}
}
示例2: error
/**
* Redirect with an error the user
*
* @param string $url The url where to redirect
* @param int $number The HTTP error number
*/
public function error($url = null, $number = 404) {
$this->redirect(request::uri($url? $url : '/'.$number), $number);
}
示例3:
<h1>Une erreur est survenue</h1>
<br />
<p>
Peut-être que vous essayez d'accéder à une page qui n'existe plus.<br /><br />
Recommencez depuis <a href="<?php
echo request::uri('/');
?>
">la page d'accueil</a>.<br /><br />
</p>
示例4: getLoginForm
public function getLoginForm(array $prm = array()) {
if (!$this->form) {
$this->form = $this->table->getRow()->getForm(array(
$this->cfg->getInArray('fields', 'login'),
$this->cfg->getInArray('fields', 'pass')
), array_merge($this->cfg->formOptions, $prm, array(
'action'=>request::uri($this->getPage('login'))
)), false);
$this->form->get($this->cfg->getInArray('fields', 'login'))->getValid()->delRule('dbUnique');
if ($this->cfg->stayConnected) {
$this->form->add('checkbox', array(
'name'=>'stayConnected',
'label'=>false,
'uniqValue'=>true,
'valid'=>array('required'=>false),
'list'=>array(
1=>utils::htmlOut($this->cfg->labelStayConnected)
)
));
}
}
return $this->form;
}
示例5: array
<?php
$cfg = array('nyroBrowser' => array('active' => true, 'config' => 'default', 'url' => request::uri('nyroBrowser'), 'width' => 770, 'height' => 480, 'title' => 'Browser'), 'tinyBrowser' => array('active' => false, 'url' => str_replace('tinybrowser', 'tinybrowser/tinybrowser.php', request::uri('js/tiny_mce/plugins/tinybrowser')), 'subdir' => null, 'width' => 770, 'height' => 480, 'title' => 'Browser'), 'tinyMce' => array('script_url' => request::uri('js/tiny_mce/tiny_mce_gzip.php' . (DEV ? null : '?diskcache=true')), 'height' => 340, 'theme' => 'advanced', 'language' => request::get('lang'), 'plugins' => 'safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template', 'theme_advanced_buttons1' => 'save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect', 'theme_advanced_buttons2' => 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor', 'theme_advanced_buttons3' => 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen', 'theme_advanced_buttons4' => 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak', 'theme_advanced_toolbar_location' => 'top', 'theme_advanced_toolbar_align' => 'left', 'theme_advanced_statusbar_location' => 'bottom', 'theme_advanced_resizing' => true, 'content_css' => 'css/content.css', 'template_external_list_url' => 'lists/template_list.js', 'external_link_list_url' => 'lists/link_list.js', 'external_image_list_url' => 'lists/image_list.js', 'media_external_list_url' => 'lists/media_list.js', 'plugins' => 'lists,safari,pagebreak,style,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras', 'theme_advanced_buttons1' => 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,formatselect', 'theme_advanced_buttons2' => 'search,replace,|,bullist,numlist,indent,outdent,|,undo,redo,|,link,unlink,anchor,image,media,|,fullscreen,code', 'theme_advanced_buttons3' => '', 'theme_advanced_buttons4' => '', 'theme_advanced_toolbar_location' => 'top', 'theme_advanced_toolbar_align' => 'left', 'theme_advanced_statusbar_location' => 'bottom', 'theme_advanced_resizing' => true, 'content_css' => '', 'template_external_list_url' => '', 'external_link_list_url' => '', 'external_image_list_url' => '', 'media_external_list_url' => '', 'relative_urls' => false));
示例6: array
<?php
$cfg = array('fileUploadedPrm' => array(), 'helper' => null, 'helperPrm' => array(), 'htmlTagName' => 'input', 'xulTagName' => 'textbox', 'htmlWrap' => 'p', 'autoDeleteOnGet' => true, 'deleteLabel' => 'delete', 'showPreview' => true, 'showDelete' => true, 'uploadify' => array('uploader' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'uploadify', 'param' => 'uploader.swf', 'out' => false)), 'multi' => true, 'auto' => true, 'fileDesc' => 'Images', 'buttonText' => 'Browse...', 'fileExt' => '*.jpg;*.gif;*.png', 'wmode' => 'transparent', 'cancelImg' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'uploadify', 'param' => 'cancel.png', 'out' => false)), 'scriptData' => array(session::getInstance()->getSessIdForce() => session_id())), 'plupload' => array('showCancelAll' => false, 'addFormVars' => false, 'runtimes' => 'html5,gears,flash,silverlight,html4', 'hideDelay' => 750, 'texts' => array('browse' => 'Browse...', 'waiting' => 'Waiting', 'error' => 'Error', 'cancel' => 'Cancelled', 'complete' => 'Complete', 'cancelAll' => 'Cancel all'), 'filters' => array(array('title' => 'Images', 'extensions' => 'jpg,jpeg,gif,png')), 'flash_swf_url' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'plupload', 'param' => 'plupload.flash.swf', 'out' => false)), 'silverlight_xap_url' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'plupload', 'param' => 'plupload.silverlight.xap', 'out' => false))), 'html' => array('type' => 'file', 'class' => 'file'));
示例7: array
<?php
$cfg = array('apiKey' => REQUIRED, 'url' => request::uri('///'), 'userAgent' => 'nyroFwk/' . NYROVERSION . ' akismet/1.1', 'apiPort' => 80, 'apiServer' => 'rest.akismet.com', 'apiVersion' => '1.1', 'comment' => array('comment_type' => 'comment', 'comment_author' => '', 'comment_author_email' => '', 'comment_author_url' => '', 'comment_content' => '', 'user_ip' => request::getIp(), 'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null), 'ignoreServerVars' => array('HTTP_COOKIE', 'HTTP_USER_AGENT', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED_HOST', 'HTTP_MAX_FORWARDS', 'HTTP_X_FORWARDED_SERVER', 'REDIRECT_STATUS', 'SERVER_PORT', 'PATH', 'DOCUMENT_ROOT', 'SERVER_ADMIN', 'QUERY_STRING', 'PHP_SELF', 'REMOTE_ADDR'));
示例8: execAdminLogout
protected function execAdminLogout(array $prm = array())
{
security::getInstance()->logout();
response::getInstance()->redirect(request::uri('/'));
}
示例9: getPage
/**
* Get a configured page
*
* @param string $type Pagename (login, logged, logout, forbidden)
* @param bool $uri Indiciate if the url should be parsed with request::uri to be used directly
* @return string The page url
*/
public function getPage($type='login', $uri=false) {
$page = $this->cfg->getInArray('pages', $type);
return $uri? request::uri($page) : $page;
}