本文整理汇总了PHP中HTMLTags_URL::parse_url方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTags_URL::parse_url方法的具体用法?PHP HTMLTags_URL::parse_url怎么用?PHP HTMLTags_URL::parse_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTags_URL
的用法示例。
在下文中一共展示了HTMLTags_URL::parse_url方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
* Create the singleton objects.
*/
$svm = Caching_SessionVarManager::get_instance();
$page_manager = PublicHTML_PageManager::get_instance();
$log_in_manager = Shop_LogInManager::get_instance();
/*
* If the user wants to create an account.
*/
if (isset($_GET['create_new_account'])) {
/*
* Check that we know where to go if something has gone
* wrong.
*/
$form_location = new HTMLTags_URL();
if (isset($_GET['form_location'])) {
$form_location->parse_url($_GET['form_location']);
} elseif (isset($_SERVER['HTTP_REFERER'])) {
$form_location->parse_url($_SERVER['HTTP_REFERER']);
} else {
throw new Exception('Unable to set the form URL!');
}
/*
* Set the session vars.
*/
if (isset($_POST['email'])) {
$svm->set('create-new-account: email', $_POST['email']);
}
if (isset($_POST['confirm_email'])) {
$svm->set('create-new-account: confirm_email', $_POST['confirm_email']);
}
try {
示例2:
<?php
/**
* The default pre-main section for redirect-scripts.
*
* @copyright Clear Line Web Design, 2007-07-17
*/
//echo '__FILE__: ' . __FILE__ . "\n";
//exit;
/*
* Create the singleton objects.
*/
$gvm = Caching_GlobalVarManager::get_instance();
$page_manager = PublicHTML_PageManager::get_instance();
/*
* This is the old fashioned way of doing this.
*/
if (isset($_GET['return_to'])) {
$return_to = new HTMLTags_URL();
$return_to->parse_url($_GET['return_to']);
$page_manager->set_return_to_url($return_to);
} else {
#$return_to_url = $page_manager->get_return_to_url();
$rm = new PublicHTML_RedirectionManager();
$return_to_url = $rm->get_current_url();
$return_to_url->set_get_variable('type', 'html');
$page_manager->set_return_to_url($return_to_url);
}
/*
* See check-get-vars.inc.php for the newer way.
*/
示例3:
///*
// * Define which page we are on.
// */
//define('PAGE', isset($_GET['page']) ? $_GET['page'] : 'home');
$success_url = new HTMLTags_URL();
if (isset($_GET['success_url'])) {
$success_url->parse_url($_GET['success_url']);
} else {
if (isset($_GET['return_to'])) {
$success_url->parse_url($_GET['return_to']);
} else {
$rm = new PublicHTML_RedirectionManager();
$success_url = $rm->get_current_url();
$success_url->set_get_variable('type', 'html');
}
}
$gvm->set('success-url', $success_url);
$failure_url = new HTMLTags_URL();
if (isset($_GET['failure_url'])) {
$failure_url->parse_url($_GET['failure_url']);
} else {
if (isset($_GET['return_to'])) {
$success_url->parse_url($_GET['return_to']);
} else {
$failure_url = clone $success_url;
}
}
$gvm->set('failure-url', $failure_url);
#echo 'print_r($gvm): ' . "\n";
#print_r($gvm);
#exit;