當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Request::getUrl方法代碼示例

本文整理匯總了PHP中Xoops\Core\Request::getUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Request::getUrl方法的具體用法?PHP Request::getUrl怎麽用?PHP Request::getUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Xoops\Core\Request的用法示例。


在下文中一共展示了Request::getUrl方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: time

         echo '<span class="red bold">' . $er . '</span><br />';
     }
     echo '</div><br />';
     $op = 'editprofile';
 } else {
     $member_handler = $xoops->getHandlerMember();
     $edituser = $member_handler->getUser($uid);
     $edituser->setVar('name', Request::getString('name', ''));
     if ($xoops->getConfig('allow_chgmail') == 1) {
         $edituser->setVar('email', $email);
     }
     if ($password != '') {
         $edituser->setVar('pass', password_hash($password, PASSWORD_DEFAULT));
         $edituser->setVar('last_pass_change', time());
     }
     $edituser->setVar('url', $xoops->formatURL(Request::getUrl('url', '')));
     $edituser->setVar('user_icq', Request::getString('user_icq', ''));
     $edituser->setVar('user_from', Request::getString('user_from', ''));
     $edituser->setVar('user_sig', XoopsLocale::substr(Request::getString('user_sig', ''), 0, 255));
     $edituser->setVar('user_viewemail', Request::getBool('user_viewemail', 0));
     $edituser->setVar('user_aim', Request::getString('user_aim', ''));
     $edituser->setVar('user_yim', Request::getString('user_yim', ''));
     $edituser->setVar('user_msnm', Request::getString('user_msnm', ''));
     $edituser->setVar('attachsig', Request::getBool('attachsig', 0));
     $edituser->setVar('timezone', Request::getString('timezone', 'UTC'));
     $edituser->setVar('uorder', Request::getInt('uorder', 0));
     $edituser->setVar('umode', Request::getString('umode', 'flat'));
     $edituser->setVar('notify_method', Request::getInt('notify_method', 1));
     $edituser->setVar('notify_mode', Request::getInt('notify_mode', 1));
     $edituser->setVar('bio', XoopsLocale::substr(Request::getString('bio', ''), 0, 255));
     $edituser->setVar('user_occ', Request::getString('user_occ', ''));
開發者ID:ming-hai,項目名稱:XoopsCore,代碼行數:31,代碼來源:edituser.php

示例2: testGetUrl

 /**
  * @covers Xoops\Core\Request::getUrl
  */
 public function testGetUrl()
 {
     $varname = 'RequestTest';
     $_REQUEST[$varname] = 'http://example.com/test.php';
     $this->assertEquals($_REQUEST[$varname], Request::getUrl($varname));
     $_REQUEST[$varname] = 'javascript:alert();';
     $this->assertEquals('', Request::getUrl($varname), Request::getUrl($varname));
     $_REQUEST[$varname] = 'modules/test/index.php';
     $this->assertEquals('modules/test/index.php', Request::getUrl($varname));
 }
開發者ID:redmexico,項目名稱:XoopsCore,代碼行數:13,代碼來源:RequestTest.php


注:本文中的Xoops\Core\Request::getUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。