本文整理汇总了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');
}