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


PHP seo::set方法代碼示例

本文整理匯總了PHP中seo::set方法的典型用法代碼示例。如果您正苦於以下問題:PHP seo::set方法的具體用法?PHP seo::set怎麽用?PHP seo::set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在seo的用法示例。


在下文中一共展示了seo::set方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

    ?>
">登錄</a><a class="reg" href="<?php 
    echo IUrl::creatUrl("/simple/reg?callback=" . $callback . "");
    ?>
">免費注冊</a>]
			<?php 
}
?>
			</p>
		</div>
	    <?php 
$seo_data = array();
$site_config = new Config('site_config');
$site_config = $site_config->getInfo();
$seo_data['title'] = "用戶登錄_" . $site_config['name'];
seo::set($seo_data);
?>
<div class="wrapper clearfix">
	<div class="wrap_box">
		<h3 class="notice">已注冊用戶,請登錄</h3>
		<p class="tips">歡迎來到我們的網站,如果您已是本站會員請登錄</p>
		<div class="box login_box clearfix">
			<form action='<?php 
echo IUrl::creatUrl("/simple/login_act");
?>
' method='post'>
				<input type="hidden" name='callback' />
				<table width="515" class="form_table f_l">
					<col width="120px" />
					<col />
開發者ID:yongge666,項目名稱:sunupedu,代碼行數:30,代碼來源:login.php

示例2: index

 public function index()
 {
     $itemId = intval(input::get('item_id'));
     if (empty($itemId)) {
         return redirect::action('topc_ctl_default@index');
     }
     if (userAuth::check()) {
         $pagedata['nologin'] = 1;
     }
     $pagedata['user_id'] = userAuth::id();
     $pagedata['image_default_id'] = $this->__setting();
     $params['item_id'] = $itemId;
     $params['fields'] = "*,item_desc.pc_desc,item_count,item_store,item_status,sku,item_nature,spec_index";
     $detailData = app::get('topc')->rpcCall('item.get', $params);
     if (!$detailData) {
         $pagedata['error'] = "很抱歉,您查看的寶貝不存在,可能已下架或者被轉移";
         return $this->page('topc/items/error.html', $pagedata);
     }
     if (count($detailData['sku']) == 1) {
         $detailData['default_sku_id'] = array_keys($detailData['sku'])[0];
     }
     $detailData['valid'] = $this->__checkItemValid($detailData);
     //判斷此商品發布的平台,如果是wap端,跳轉至wap鏈接
     if ($detailData['use_platform'] == 2) {
         redirect::action('topm_ctl_item@index', array('item_id' => $itemId))->send();
         exit;
     }
     //相冊圖片
     if ($detailData['list_image']) {
         $detailData['list_image'] = explode(',', $detailData['list_image']);
     }
     //獲取商品的促銷信息
     $promotionDetail = app::get('topc')->rpcCall('item.promotiontag.get', array('item_id' => $itemId));
     if ($promotionDetail) {
         $promotionIds = explode(',', $promotionDetail['promotion_ids']);
         foreach ($promotionIds as $promotionId) {
             $basicPromotionInfo = app::get('topc')->rpcCall('promotion.promotion.get', array('promotion_id' => $promotionId, 'platform' => 'pc'));
             if ($basicPromotionInfo['valid'] === true) {
                 $pagedata['promotionDetail'][$promotionId] = $basicPromotionInfo;
             }
         }
     }
     $pagedata['promotion_count'] = count($pagedata['promotionDetail']);
     // 活動促銷(如名字叫團購)
     $activityDetail = app::get('topc')->rpcCall('promotion.activity.item.info', array('item_id' => $itemId, 'valid' => 1), 'buyer`');
     if ($activityDetail) {
         $pagedata['activityDetail'] = $activityDetail;
     }
     $detailData['spec'] = $this->__getSpec($detailData['spec_desc'], $detailData['sku']);
     $detailData['qrCodeData'] = $this->__qrCode($itemId);
     $pagedata['item'] = $detailData;
     //獲取商品詳情頁左側店鋪分類信息
     $pagedata['shopCat'] = app::get('topc')->rpcCall('shop.cat.get', array('shop_id' => $pagedata['item']['shop_id']));
     //獲取該商品的店鋪信息
     $pagedata['shop'] = app::get('topc')->rpcCall('shop.get', array('shop_id' => $pagedata['item']['shop_id']));
     //獲取該商品店鋪的DSR信息
     $pagedata['shopDsrData'] = $this->__getShopDsr($pagedata['item']['shop_id']);
     $pagedata['next_page'] = url::action("topc_ctl_item@index", array('item_id' => $itemId));
     if ($pagedata['user_id']) {
         //獲取該用戶的最近購買記錄
         $pagedata['buyerList'] = app::get('topc')->rpcCall('trade.user.buyerList', array('user_id' => $pagedata['user_id']));
     }
     //設置此頁麵的seo
     $brand = app::get('topc')->rpcCall('category.brand.get.info', array('brand_id' => $detailData['brand_id']));
     $cat = app::get('topc')->rpcCall('category.cat.get.info', array('cat_id' => $detailData['cat_id']));
     $seoData = array('item_title' => $detailData['title'], 'shop_name' => $pagedata['shop']['shop_name'], 'item_brand' => $brand['brand_name'], 'item_bn' => $detailData['bn'], 'item_cat' => $cat[$detailData['cat_id']]['cat_name'], 'sub_title' => $detailData['sub_title']);
     seo::set('topc.item.detail', $seoData);
     //echo '<pre>';print_r($pagedata);exit();
     return $this->page('topc/items/index.html', $pagedata);
 }
開發者ID:453111208,項目名稱:bbc,代碼行數:70,代碼來源:item.php


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