本文整理汇总了PHP中Net_URL类的典型用法代码示例。如果您正苦于以下问题:PHP Net_URL类的具体用法?PHP Net_URL怎么用?PHP Net_URL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Net_URL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: analyze
function analyze()
{
/* Find out the fully-qualified URL of test_feed.html */
$target = new Net_URL('test_feed.html');
$url = $target->getURL();
/* Static values */
$this->channel = new HTMLToFeed_Channel();
$this->channel->title = 'Sample RSS feed';
$this->channel->link = $url;
$this->channel->description = 'This is a sample RSS feed created from a bogus HTML.';
$this->channel->language = 'ja';
try {
$xml = $this->getXmlObject($url);
} catch (Exception $e) {
exit($e->getMessage());
}
/* Retrieve and parse LI elements */
if ($li_elements = $xml->body->ul->li) {
$this->convertPath($li_elements, array('a' => 'href'));
foreach ($li_elements as $li) {
$item = new HTMLToFeed_Item();
$item->title = (string) $li->a;
$item->link = $item->guid = (string) $li->a['href'];
if (preg_match('|(\\d{4})/(\\d{1,2})/(\\d{1,2})|s', $item->title, $matches)) {
$item->pubDate = strtotime("{$matches['1']}-{$matches['2']}-{$matches['3']}");
}
$this->channel->items[] = $item;
}
}
$this->sortMultiArray($this->channel->items, 'pubDate');
}
开发者ID:diggin-sandbox,项目名称:mirror-htmlscraping-20090114,代码行数:31,代码来源:test_feed.php
示例2: page_a
function page_a($url, $page, $text)
{
$url_obj = new Net_URL($url);
$url_obj->addQueryString('page', $page);
$newurl = $url_obj->getURL();
return "<a href='{$newurl}'>{$text}</a>";
}
开发者ID:nsahoo,项目名称:cmssw-1,代码行数:7,代码来源:pager_functions.php
示例3: sendResponse
/**
* Page のレスポンス送信.
*
* @return void
*/
public function sendResponse()
{
// ループ防止に現在URLを格納
$location = '';
$netUrl = new Net_URL();
$location = $netUrl->getUrl();
// ログインされていなく、リダイレクト処理
if (empty($this->isLogin) && !preg_match('/^.*original.*/', $location)) {
$this->objDisplay->response->sendRedirect('original');
}
$objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
// ローカルフックポイントを実行.
$this->doLocalHookpointAfter($objPlugin);
// HeadNaviにpluginテンプレートを追加する.
$objPlugin->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']);
// スーパーフックポイントを実行.
$objPlugin->doAction('LC_Page_process', array($this));
// ページクラス名をテンプレートに渡す
$arrBacktrace = debug_backtrace();
if (strlen($this->tpl_page_class_name) === 0) {
$this->tpl_page_class_name = preg_replace('/_Ex$/', '', $arrBacktrace[1]['class']);
}
$this->objDisplay->prepare($this);
$this->objDisplay->addHeader('Vary', 'User-Agent');
$this->objDisplay->response->write();
}
开发者ID:geany-y,项目名称:cube2,代码行数:31,代码来源:LC_Page_Ex.php
示例4: getInstallerPath
/**
* インストーラーの URL を返す
*
* @return string インストーラーの URL
*/
public static function getInstallerPath()
{
$netUrl = new Net_URL();
$installer = 'install/' . DIR_INDEX_PATH;
// XXX メソッド名は add で始まるが、実際には置換を行う
$netUrl->addRawQueryString('');
$current_url = $netUrl->getURL();
$current_url = dirname($current_url) . '/';
// XXX 先頭の / を含まない。
$urlpath = substr($_SERVER['SCRIPT_FILENAME'], strlen(HTML_REALDIR));
// / を 0、/foo/ を 1 としたディレクトリー階層数
$dir_level = substr_count($urlpath, '/');
$installer_url .= str_repeat('../', $dir_level) . $installer;
return $installer_url;
}
开发者ID:casan,项目名称:eccube-2_13,代码行数:20,代码来源:SC_Utils.php
示例5: setReturnTo
function setReturnTo($key, $mode)
{
if (SC_Utils_Ex::isAppInnerUrl($_SERVER["HTTP_REFERER"])) {
$netUrl = new Net_URL($_SERVER["HTTP_REFERER"]);
$dir = basename(dirname($netUrl->path));
$file = basename($netUrl->path);
if (preg_match("{.*(confirm|complete).php}", $file)) {
GC_Utils_Ex::gfPrintLog($file);
return;
}
switch ($dir) {
case "au":
case "docomo":
case "softbank":
break;
default:
$_SESSION[$key] = $netUrl->getURL();
break;
}
}
}
开发者ID:alice-asahina,项目名称:kisekae_touch,代码行数:21,代码来源:LC_Page_Au_Dummy.php
示例6: lfGetNews
/**
* 新着情報を取得する.
*
* @return array $arrNewsList 新着情報の配列を返す
*/
function lfGetNews(&$objQuery)
{
if (DB_TYPE != 'sqlsrv') {
return parent::lfGetNews($objQuery);
} else {
$objQuery->setOrder('rank DESC ');
$arrNewsList = $objQuery->select("* ,convert(varchar(4), YEAR(news_date)) + '-' + convert(varchar(2), MONTH(news_date)) + '-' + convert(varchar(10), DAY(news_date)) as news_date_disp", 'dtb_news', 'del_flg = 0');
// モバイルサイトのセッション保持 (#797)
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
foreach (array_keys($arrNewsList) as $key) {
$arrRow =& $arrNewsList[$key];
if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
$netUrl = new Net_URL($arrRow['news_url']);
$netUrl->addQueryString(session_name(), session_id());
$arrRow['news_url'] = $netUrl->getURL();
}
}
}
return $arrNewsList;
}
}
开发者ID:nanasess,项目名称:eccube-WindowsAzureBlob-plugin,代码行数:26,代码来源:LC_Page_FrontParts_Bloc_News_Ex.php
示例7: convertPath
function convertPath($in_to, $path)
{
// it's a // url (eg. use https if already in https mode...)
if (preg_match('#^//#', $path)) {
return $path;
}
//print_r(array($this->baseURL, $in_to, $path ));
require_once 'Net/URL.php';
$a = new Net_URL();
$path = $a->resolvePath($this->baseURL . '/' . $path);
// not sure if that's a good idea..
$to = rtrim($a->resolvePath($in_to), '/');
//print_r(array($path,$to));
$path1 = $path ? explode('/', $path) : array();
$path2 = $to ? explode('/', $to) : array();
$shared = array();
// compare paths & strip identical ancestors
foreach ($path1 as $i => $chunk) {
if (isset($path2[$i]) && $path1[$i] == $path2[$i]) {
$shared[] = $chunk;
} else {
break;
}
}
$shared = implode('/', $shared);
//print_r(array($shared));
$path = mb_substr($path, mb_strlen($shared));
$to = mb_substr($to, mb_strlen($shared));
$to = str_repeat('../', mb_substr_count($to, '/'));
$ret = $to . ltrim($path, '/');
//print_r(array($ret));
return $ret;
}
开发者ID:roojs,项目名称:pear,代码行数:33,代码来源:Minify.php
示例8: doCheckBuyAndDownload
function doCheckBuyAndDownload($config)
{
$objFormParam = new SC_FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objCustomer = new SC_Customer_Ex();
$objQuery = SC_Query::getSingletonInstance();
$detect = new Mobile_Detect();
$version = $detect->version("iOS", Mobile_Detect::VERSION_TYPE_FLOAT);
$contentid = $this->arrProduct["product_code_min"];
$curl = $this->curl_init(KISEKAE_TOUCH_IPHONE_API01);
$post = $this->getPost($config, array("contentid" => $contentid, "device" => $objFormParam->getValue("device_name", "iPhone6"), "version" => floor($version), "apiversion" => null, "operator" => "au", "lang" => "ja"));
$this->getDs($post, $config);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
$result = curl_exec($curl);
$status = SC_XML::xpath($result, "//status/@value");
$vid = SC_XML::xpath($result, "//validation/@id");
switch ($status) {
default:
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
case "000":
GC_Utils_Ex::gfDebugLog($result);
$_COOKIE["product_ktc_vid"] = $vid;
break;
}
// API2
$openid = $objCustomer->getValue("au_open_id");
$curl = $this->curl_init(KISEKAE_TOUCH_IPHONE_API02);
$post = $this->getPost($config, array("contentid" => $contentid, "userid" => $openid, "vid" => $vid));
$this->getDs($post, $config);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
$result = curl_exec($curl);
$status = SC_XML::xpath($result, "//status/@value");
switch ($status) {
default:
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
break;
case "000":
case "010":
// TEST
// /ios/products/detail.php?mode=check_buy_and_download&product_id=13&classcategory_id1=0&classcategory_id2=0&quantity=1&admin=&favorite_product_id=&product_class_id=&device_name=iPhone6Plus&device_height=736&device_width=414&device_rate=3&device_lang=ja&ignore_redownload=1
if ($_GET["ignore_redownload"] == "1") {
$status = "000";
}
break;
}
if ($status == "000") {
// FIXME 課金処理
// API03
$curl = $this->curl_init(KISEKAE_TOUCH_IPHONE_API03);
if ($objCustomer->getValue("buy_to_nopoint") == "1") {
$price = $this->arrProduct["price02_min"];
$settlementtype = "998";
$redownloaddate = date("Ymd");
} else {
$price = $this->arrProduct["price02_min"];
$settlementtype = "001";
$redownloaddate = date("Ymd", strtotime($this->downloadable_days2));
}
$post = $this->getPost($config, array("contentid" => $contentid, "price" => $price, "redownloaddate" => $redownloaddate, "userid" => $openid, "vid" => $vid, "settlementtype" => $settlementtype));
$this->getDs($post, $config);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
GC_Utils_Ex::gfPrintLog(print_r($post, TRUE), DEBUG_LOG_REALFILE);
$result = curl_exec($curl);
$authentication_id = SC_XML::xpath($result, "//authentication/@id");
$objFormParam = new SC_FormParam();
$this->setOrderParam($objFormParam, $vid, $authentication_id);
$objFormParam->convParam();
$message = '';
$arrValBef = array();
$objPurchase = new SC_Helper_Purchase_Ex();
$objPurchase->saveShippingTemp(array());
$order_id = $this->doRegister("", $objPurchase, $objFormParam, $message, $arrValBef);
$customer_id = $objCustomer->getValue("customer_id");
$this->addPointHistory($order_id, $customer_id, $objFormParam, $objQuery);
} else {
$authentication_id = SC_XML::xpath($result, "//authentication/@id");
}
$netUrl = new Net_URL(KISEKAE_TOUCH_IPHONE_CST02);
$netUrl->addQueryString("aid", $authentication_id);
$netUrl->addQueryString("cpid", $config["cpid"]);
$netUrl->addQueryString("siteid", $config["siteid"]);
$netUrl->addQueryString("contentid", $contentid);
$netUrl->addQueryString("ts", date("YmdHis"));
$post2 = $netUrl->querystring;
$this->getDs($post2, $config);
$netUrl->addRawQueryString(http_build_query($post2));
GC_Utils_Ex::gfPrintLog(print_r($post2, TRUE), DEBUG_LOG_REALFILE);
header("Location: " . $netUrl->getURL());
}
开发者ID:alice-asahina,项目名称:kisekae_touch,代码行数:92,代码来源:LC_Page_iOS_Products_Detail.php
示例9: ini_set
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '../lib');
require_once 'init.php';
require_once 'data.php';
$C = new Context(DB_DSN, GUARDIAN_API_KEY, FLICKR_API_KEY, $_COOKIE['visitor']);
$C->setCookie();
list($response_format, $response_mime_type) = parse_format($_GET['format'], 'html');
$woe_id = is_numeric($_GET['woe']) ? intval($_GET['woe']) : null;
$woe_ids = isset($_GET['woes']) ? intvals($_GET['woes']) : null;
$article_id = is_numeric($_GET['article']) ? intval($_GET['article']) : null;
$article_ids = isset($_GET['articles']) ? intvals($_GET['articles']) : null;
$count = is_numeric($_GET['count']) ? intval($_GET['count']) : null;
$offset = is_numeric($_GET['offset']) ? intval($_GET['offset']) : 0;
$js_callback = $response_mime_type == 'text/javascript' && $_GET['callback'] ? sanitize_js_callback($_GET['callback']) : null;
if ($woe_id && $article_id) {
$url = new Net_URL('http://' . get_domain_name() . get_base_dir() . '/point.php');
$url->addQueryString('article', $article_id);
$url->addQueryString('woe', $woe_id);
$url->addQueryString('format', $response_format);
header('Location: ' . $url->getURL());
exit;
} elseif (($article_ids || $woe_ids) && ($article_id || $woe_id)) {
header('Content-Type: text/plain');
die_with_code(400, "It's not possible to specify both singular and plural article/WOE ID's.\n");
} else {
$points = get_points($C, compact('article_id', 'woe_id', 'article_ids', 'woe_ids', 'count', 'offset'));
$total = get_points_total($C, compact('article_id', 'woe_id', 'article_ids', 'woe_ids'));
$count = count($points);
}
$C->close();
header("Content-Type: {$response_mime_type}; charset=UTF-8");
开发者ID:RandomEtc,项目名称:apimaps,代码行数:30,代码来源:points.php
示例10: meldPersistQuery
function meldPersistQuery($sQuery = "", $event = "", $asArray = false)
{
if (is_array($sQuery)) {
$aQuery = $sQuery;
} else {
if (!empty($sQuery)) {
// need an intermediate step here.
$aQuery = Net_URL::_parseRawQuerystring($sQuery);
} else {
$aQuery = array();
}
}
// now try to grab each persisted entry
// don't overwrite the existing values, if added.
if (is_array($this->aPersistParams)) {
foreach ($this->aPersistParams as $k) {
if (!array_key_exists($k, $aQuery)) {
$v = KTUtil::arrayGet($_REQUEST, $k);
if (!empty($v)) {
$aQuery[$k] = $v;
}
}
// handle the case where action is passed in already.
}
}
// if it isn't already set
if (!array_key_exists($this->event_var, $aQuery) && !empty($event)) {
$aQuery[$this->event_var] = urlencode($event);
}
//var_dump($aQuery);
if ($asArray) {
return $aQuery;
}
// encode and blend.
$aQueryStrings = array();
foreach ($aQuery as $k => $v) {
$aQueryStrings[] = urlencode($k) . "=" . urlencode($v);
}
$sQuery = join('&', $aQueryStrings);
return $sQuery;
}
开发者ID:sfsergey,项目名称:knowledgetree,代码行数:41,代码来源:dispatcher.inc.php
示例11: lfGetNews
/**
* 新着情報を取得する.
*
* @return array $arrNewsList 新着情報の配列を返す
*/
function lfGetNews(&$objQuery)
{
$objQuery->setOrder('rank DESC ');
$arrNewsList = $objQuery->select('* , cast(news_date as date) as news_date_disp', 'dtb_news', 'del_flg = 0');
// モバイルサイトのセッション保持 (#797)
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
foreach ($arrNewsList as $key => $value) {
$arrRow =& $arrNewsList[$key];
if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
$netUrl = new Net_URL($arrRow['news_url']);
$netUrl->addQueryString(session_name(), session_id());
$arrRow['news_url'] = $netUrl->getURL();
}
}
}
return $arrNewsList;
}
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:22,代码来源:LC_Page_FrontParts_Bloc_News.php
示例12: getLocation
/**
* $path から URL を取得する.
*
* 以下の順序で 引数 $path から URL を取得する.
* 1. realpath($path) で $path の 絶対パスを取得
* 2. $_SERVER['DOCUMENT_ROOT'] と一致する文字列を削除
* 3. $useSSL の値に応じて, HTTP_URL 又は, HTTPS_URL を付与する.
*
* 返り値に, QUERY_STRING を含めたい場合は, key => value 形式
* の配列を $param へ渡す.
*
* @access protected
* @param string $path 結果を取得するためのパス
* @param array $param URL に付与するパラメーターの配列
* @param mixed $useSSL 結果に HTTPS_URL を使用する場合 true,
* HTTP_URL を使用する場合 false,
* デフォルト 'escape' 現在のスキーマを使用
* @return string $path の存在する http(s):// から始まる絶対パス
* @see Net_URL
*/
function getLocation($path, $param = array(), $useSSL = 'escape')
{
$rootPath = $this->getRootPath($path);
// スキーマを定義
if ($useSSL === true) {
$url = HTTPS_URL . $rootPath;
} elseif ($useSSL === false) {
$url = HTTP_URL . $rootPath;
} elseif ($useSSL == 'escape') {
if (SC_Utils_Ex::sfIsHTTPS()) {
$url = HTTPS_URL . $rootPath;
} else {
$url = HTTP_URL . $rootPath;
}
} else {
die("[BUG] Illegal Parametor of \$useSSL ");
}
$netURL = new Net_URL($url);
// QUERY_STRING 生成
foreach ($param as $key => $val) {
$netURL->addQueryString($key, $val);
}
return $netURL->getURL();
}
开发者ID:snguyenone,项目名称:ec-cube-ja-2.12.6,代码行数:44,代码来源:LC_Page.php
示例13: lfGetNews
/**
* 新着情報を取得する
*
* @return array $arrNews 取得結果を配列で返す
*/
public function lfGetNews()
{
$objNews = new SC_Helper_News_Ex();
$arrNews = $objNews->getList();
$objDb = new SC_Helper_DB_Ex();
$arrInfo = $objDb->sfGetBasisData();
// RSS用に変換
foreach (array_keys($arrNews) as $key) {
$netUrlHttpUrl = new Net_URL(HTTP_URL);
$row =& $arrNews[$key];
$row['shop_name'] = $arrInfo['shop_name'];
$row['email'] = $arrInfo['email04'];
// 日付
$row['news_date'] = date('r', strtotime($row['news_date']));
// 新着情報URL
if (SC_Utils_Ex::isBlank($row['news_url'])) {
$row['news_url'] = HTTP_URL;
} elseif ($row['news_url'][0] == '/') {
// 変換(絶対パス→URL)
$netUrl = new Net_URL($row['news_url']);
$netUrl->protocol = $netUrlHttpUrl->protocol;
$netUrl->user = $netUrlHttpUrl->user;
$netUrl->pass = $netUrlHttpUrl->pass;
$netUrl->host = $netUrlHttpUrl->host;
$netUrl->port = $netUrlHttpUrl->port;
$row['news_url'] = $netUrl->getUrl();
}
}
return $arrNews;
}
开发者ID:ryoogata,项目名称:eccube-SQLAzureSupport-plugin,代码行数:35,代码来源:LC_Page_Rss.php
示例14: Net_URL
echo "<th>Tytu³</th>";
if ($ustawieniaGaleriiZdjec->obslugaPolaGaleriaZdjecOpis) {
echo "<th>Opis</th>";
}
if ($ustawieniaGaleriiZdjec->obslugaPolaGaleriaZdjecNowa) {
echo "<th>Nowa</th>";
}
if ($ustawieniaGaleriiZdjec->obslugaPolaGaleriaZdjecPrawieNowa) {
echo "<th>Prawie nowa</th>";
}
echo "<th>Akcja</th>";
echo "<tr>\n";
$edytujUrl = new Net_URL($_SERVER['REQUEST_URI'], false);
$usunUrl = new Net_URL($_SERVER['REQUEST_URI'], false);
$dodajUrl = new Net_URL($_SERVER['REQUEST_URI'], false);
$dodajUrl->addQueryString("dodaj", "1");
$dodajLink = $dodajUrl->getURL();
foreach ($galerie as $galeriaZdjec) {
$edytujUrl->addQueryString("edytuj", $galeriaZdjec->katalog);
$edytujLink = $edytujUrl->getURL();
$usunUrl->addQueryString("usun", $galeriaZdjec->katalog);
$usunLink = $usunUrl->getURL();
echo "<tr>";
echo "<td>" . $galeriaZdjec->katalog . "</td>";
echo "<td>" . $galeriaZdjec->data . "</td>";
echo "<td>" . $galeriaZdjec->tytulGalerii . "</td>";
开发者ID:BGCX261,项目名称:zhr-zielonagora-svn-to-git,代码行数:31,代码来源:zarzadzanieGaleriamiZdjec.php
示例15: action
//.........这里部分代码省略.........
$objPlugin->doAction('LC_Page_Products_Detail_action_add_favorite', array($this));
SC_Response_Ex::actionExit();
}
}
}
break;
case 'add_favorite_sphone':
// ログイン中のユーザが商品をお気に入りにいれる処理(スマートフォン用)
if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) {
$this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam);
if (count($this->arrErr) == 0) {
if ($this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'), $objCustomer->getValue('customer_id'))) {
$objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
$objPlugin->doAction('LC_Page_Products_Detail_action_add_favorite_sphone', array($this));
print 'true';
SC_Response_Ex::actionExit();
}
}
print 'error';
SC_Response_Ex::actionExit();
}
break;
case 'select':
case 'select2':
case 'selectItem':
/**
* モバイルの数量指定・規格選択の際に、
* $_SESSION['cart_referer_url'] を上書きさせないために、
* 何もせずbreakする。
*/
break;
default:
// カート「戻るボタン」用に保持
$netURL = new Net_URL();
$_SESSION['cart_referer_url'] = $netURL->getURL();
break;
}
// モバイル用 ポストバック処理
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
switch ($this->mode) {
case 'select':
// 規格1が設定されている場合
if ($this->tpl_classcat_find1) {
// templateの変更
$this->tpl_mainpage = 'products/select_find1.tpl';
break;
}
// 数量の入力を行う
$this->tpl_mainpage = 'products/select_item.tpl';
break;
case 'select2':
$this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam, $this->tpl_classcat_find1, $this->tpl_classcat_find2);
// 規格1が設定されていて、エラーを検出した場合
if ($this->tpl_classcat_find1 and $this->arrErr['classcategory_id1']) {
// templateの変更
$this->tpl_mainpage = 'products/select_find1.tpl';
break;
}
// 規格2が設定されている場合
if ($this->tpl_classcat_find2) {
$this->arrErr = array();
$this->tpl_mainpage = 'products/select_find2.tpl';
break;
}
case 'selectItem':
$this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam, $this->tpl_classcat_find1, $this->tpl_classcat_find2);
开发者ID:nanasess,项目名称:eccube-WindowsAzureBlob-plugin,代码行数:67,代码来源:LC_Page_Products_Detail.php
示例16: generate
public function generate($values = array(), $qstring = array(), $anchor = '')
{
$path = '';
foreach ($this->parts as $part) {
$path .= $part->generate($values);
}
$path = '/' . trim(Net_URL::resolvePath($path), '/');
if (!empty($qstring)) {
$path .= '?' . http_build_query($qstring);
}
if (!empty($anchor)) {
$path .= '#' . ltrim($anchor, '#');
}
return $path;
}
开发者ID:ookwudili,项目名称:chisimba,代码行数:15,代码来源:Path.php
示例17: gfFinishKaraMail
/**
* 空メール管理テーブルからトークンが一致する行を削除し、
* 次に遷移させるページのURLを返す。
*
* メールアドレスは $_SESSION['mobile']['kara_mail_from'] に登録される。
*
* @param string $token トークン
* @return string|false URLを返す。エラーが発生した場合はfalseを返す。
*/
function gfFinishKaraMail($token)
{
$objQuery =& SC_Query_Ex::getSingletonInstance();
$arrRow = $objQuery->getRow('session_id, next_url, email', 'dtb_mobile_kara_mail', 'token = ? AND email IS NOT NULL AND receive_date >= ?', array($token, date('Y-m-d H:i:s', time() - MOBILE_SESSION_LIFETIME)), DB_FETCHMODE_ORDERED);
if (!isset($arrRow)) {
return false;
}
$objQuery->delete('dtb_mobile_kara_mail', 'token = ?', array($token));
list($session_id, $next_url, $email) = $arrRow;
$objURL = new Net_URL(HTTP_URL . $next_url);
$objURL->addQueryString(session_name(), $session_id);
$url = $objURL->getURL();
session_id($session_id);
session_start();
$_SESSION['mobile']['kara_mail_from'] = $email;
session_write_close();
return $url;
}
开发者ID:nassos9090,项目名称:plugin,代码行数:27,代码来源:SC_Helper_Mobile.php
示例18: sendPingbackHeader
/**
* Send a Pingback header to tell this is a pingback-enable resource.
*
* @param string $pingbackURI (optional) Pingback URI, if not given URI is
* the current URI.
*
* @return bool|PEAR_Error TRUE on success or PEAR_Error on failure.
* @access public
* @static
*/
function sendPingbackHeader($pingbackURI = null)
{
if (headers_sent()) {
return PEAR::raiseError('Header already sent, cannot sent Pingback header');
}
if ($pingbackURI === null) {
$url = new Net_URL($url);
$pingbackURI = $url->getURL();
}
header('X-Pingback: ' . $pingbackURI);
return true;
}
开发者ID:Dulciane,项目名称:jaws,代码行数:22,代码来源:Pingback.php
示例19: lfGetNews
/**
* 新着情報を取得する.
*
* @return array $arrNewsList 新着情報の配列を返す
*/
public function lfGetNews($dispNumber, $pageNo, SC_Helper_News_Ex $objNews)
{
$arrNewsList = $objNews->getList($dispNumber, $pageNo);
// モバイルサイトのセッション保持 (#797)
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
foreach ($arrNewsList as $key => $value) {
$arrRow =& $arrNewsList[$key];
if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
$netUrl = new Net_URL($arrRow['news_url']);
$netUrl->addQueryString(session_name(), session_id());
$arrRow['news_url'] = $netUrl->getURL();
}
}
}
return $arrNewsList;
}
开发者ID:rateon,项目名称:twhk-ec,代码行数:21,代码来源:LC_Page_FrontParts_Bloc_News.php
示例20: doDefault
/**
*
*
* @return void
*/
function doDefault()
{
// カート「戻るボタン」用に保持
$netURL = new Net_URL();
$_SESSION['cart_referer_url'] = $netURL->getURL();
}
开发者ID:Rise-Up-Cambodia,项目名称:Rise-Up,代码行数:11,代码来源:LC_Page_Products_Detail.php
注:本文中的Net_URL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论