本文整理匯總了PHP中Server::getCurrentUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Server::getCurrentUrl方法的具體用法?PHP Server::getCurrentUrl怎麽用?PHP Server::getCurrentUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server
的用法示例。
在下文中一共展示了Server::getCurrentUrl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: postContactInfo
private function postContactInfo(\Request $request)
{
$values = $request->getVars();
Factory::post(Factory::load(), $values['vars']);
$response = new \Http\SeeOtherResponse(\Server::getCurrentUrl(false));
return $response;
}
示例2: __construct
/**
*
* @staticvar int $default_id Helps in the creation of form ids if none is set
*/
public function __construct()
{
parent::__construct('form');
$this->action = \Server::getCurrentUrl();
static $default_id = 1;
$this->setId('form-' . $default_id);
$default_id++;
$this->addClass('phpws-form');
}
示例3: trackAuthentication
/**
* Trying to find out why Users changes authentication script. If cause
* is found, this will be removed.
*/
public static function trackAuthentication($message)
{
$url = \Server::getCurrentUrl(false, false);
$request = \Server::getCurrentRequest();
if ($request->isPost()) {
$type = 'POST';
} else {
$type = 'GET';
}
$vars = $request->getVars();
if (empty($vars)) {
$variables = 'No variables';
} else {
foreach ($vars['vars'] as $k => $v) {
if (is_array($v)) {
$v = serialize($v);
}
$varlist[] = "{$k}: {$v}";
}
$variables = implode("\n", $varlist);
}
$content = <<<EOF
MESSAGE: {$message}
REQUEST TYPE: {$type}
VARIABLES:
{$variables}
----
EOF;
\PHPWS_Core::log($content, 'default_authorization.log');
}