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


PHP HTMLTags_URL::parse_url方法代碼示例

本文整理匯總了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 {
開發者ID:saulhoward,項目名稱:haddock-cms,代碼行數:31,代碼來源:main.inc.php

示例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.
 */
開發者ID:saulhoward,項目名稱:haddock-cms,代碼行數:31,代碼來源:pre-main.inc.php

示例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;
開發者ID:saulhoward,項目名稱:haddock-cms,代碼行數:31,代碼來源:check-get-vars.inc.php


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