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


PHP XWB_plugin::baseUrl方法代碼示例

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


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

示例1: array

		<!--安裝失敗的信息:給出提示信息-->
		<div class="mainTxt">
			<hr />
            		<div class="con red"><p><strong>安裝失敗,安裝數據已全部回退。</strong></p></div>
			<div class="con red"><p>如果您能將“初始化程序以及數據”提示信息,以及論壇地址、論壇版本和論壇字符編碼等信息反饋給我們(比如<a href="http://bbs.x.weibo.com/forum/forumdisplay.php?fid=9" target="_blank">官方論壇</a>),將有助於我們的產品改進,感謝您的支持!</p></div>
			<div class="con red"><p>聯係郵箱:<a href="mailto:xweibo@vip.sina.com">mailto:xweibo@vip.sina.com</a>&nbsp;|&nbsp;技術支持:<a href="http://x.weibo.com/" target="_blank">Xweibo官網</a></p></div>
		</div>
		<div class="clear"></div>
		
		<?php 
}
?>
		
		<div class="footer">Copyright &copy; 1996-2010 SINA</div>
		</div>
</div>

<?php 
//統計上報[安裝]
$xwb_statType = 'in';
$xwb_statArgs = array();
$xwb_statArgs['akey'] = $appkey;
$xwb_statArgs['uid'] = 0;
$xwb_statArgs['domain'] = str_replace(array('http://', 'https://'), '', XWB_plugin::baseUrl());
$xwb_statArgs['qq'] = $qq;
echo XWB_plugin::statUrl($xwb_statType, $xwb_statArgs, true);
?>

</body>
</html>
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:30,代碼來源:step3.php

示例2: siteUrl

 /**
  * 獲取當前腳本的完整url路徑。末尾有/
  */
 function siteUrl()
 {
     if (defined('XWB_S_SITEURL')) {
         return XWB_S_SITEURL;
     }
     return XWB_plugin::baseUrl() . XWB_plugin::pathUrl();
 }
開發者ID:chibimiku,項目名稱:xweibo_for_discuz_x2_php7,代碼行數:10,代碼來源:core.class.php

示例3: _getOAuthUrl

 function _getOAuthUrl()
 {
     static $aurl = null;
     if (!empty($aurl)) {
         return $aurl;
     }
     $sess = XWB_plugin::getUser();
     $sess->clearToken();
     $wbApi = XWB_plugin::getWB();
     $keys = $wbApi->getRequestToken();
     if (!isset($keys['oauth_token']) || !isset($keys['oauth_token_secret'])) {
         $api_error_origin = isset($keys['error']) ? $keys['error'] : 'UNKNOWN ERROR. MAYBE SERVER CAN NOT CONNECT TO SINA API SERVER';
         $api_error = isset($keys['error_CN']) && !empty($keys['error_CN']) && 'null' != $keys['error_CN'] ? $keys['error_CN'] : '';
         XWB_plugin::LOG("[WEIBO CLASS]\t[ERROR]\t#{$wbApi->req_error_count}\t{$api_error}\t{$wbApi->last_req_url}\tERROR ARRAY:\r\n" . print_r($keys, 1));
         XWB_plugin::showError("服務器獲取Request Token失敗;請稍候再試。<br />錯誤原因:{$api_error}[{$api_error_origin}]");
     }
     //print_r($keys);
     $aurl = $wbApi->getAuthorizeURL($keys['oauth_token'], false, XWB_plugin::baseUrl() . XWB_plugin::URL('xwbAuth.authCallBack'));
     //echo  XWB_plugin::baseUrl().XWB_plugin::URL('xwbAuth.authCallBack')."\n";
     $sess->setOAuthKey($keys, false);
     return rtrim($aurl, '&');
     //."&from=xweibo&xtype=1";
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:23,代碼來源:xwbAuth.mod.php

示例4: bind

 function bind()
 {
     if (!XWB_plugin::pCfg('is_account_binding')) {
         XWB_plugin::showError('新浪微博綁定功能已經關閉!');
     }
     if (XWB_S_UID > 0 && XWB_plugin::isUserBinded()) {
         $xwb_user = XWB_plugin::getUser();
         $sina_id = $xwb_user->getInfo('sina_uid');
         $wb = XWB_plugin::getWB();
         $wb->is_exit_error = false;
         $sina_user_info = $wb->getUserShow($sina_id);
         if (isset($sina_user_info['error_code']) || isset($sina_user_info['error'])) {
             include XWB_P_ROOT . '/tpl/xwb_cenbind_error.tpl.php';
         } else {
             $db = XWB_plugin::getDB();
             $share = XWB_plugin::V("R:share");
             $share_msg = '';
             if ($share) {
                 $bind_info = $db->fetch_first("select * from " . XWB_S_TBPRE . "xwb_bind_info where `uid`='" . XWB_S_UID . "'");
                 $share_time = $bind_info['share_time'];
                 if (!$share_time) {
                     $share_time = time();
                     $db->query("update " . XWB_S_TBPRE . "xwb_bind_info set `share_time`='" . $share_time . "' where `uid`='" . XWB_S_UID . "'");
                     jclass('misc')->update_account_bind_info(XWB_S_UID, '', '', 1);
                     $share_msg = "<img src='" . (XWB_plugin::baseUrl() . XWB_plugin::URL('&code=enter&share_time=' . $share_time)) . "' width='0' height='0' />";
                 }
             } else {
                 /**
                  * 分享給好友顯示頁麵
                  */
                 $skip_share = XWB_plugin::V("R:skip_share");
                 if (!$skip_share) {
                     $bind_info = $db->fetch_first("select * from " . XWB_S_TBPRE . "xwb_bind_info where `uid`='" . XWB_S_UID . "'");
                     if (!$bind_info['share_time']) {
                         include XWB_P_ROOT . '/tpl/xwb_cenbind_share.tpl.php';
                         exit;
                     }
                 }
             }
             $screen_name = $sina_user_info['screen_name'];
             $profile = XWB_plugin::O('xwbUserProfile');
             $setting = $profile->get('bind_setting', 1);
             $tojishigou = $profile->get('synctopic_tojishigou', 0);
             $reply_tojishigou = $profile->get('syncreply_tojishigou', 0);
             include XWB_P_ROOT . '/tpl/xwb_cenbind_on.tpl.php';
         }
     } else {
         include XWB_P_ROOT . '/tpl/xwb_cenbind_off.tpl.php';
     }
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:50,代碼來源:xwbSiteInterface.mod.php

示例5: siteUrl

 /**
  * 獲取當前腳本的完整url路徑。
  * @param integer $deep
  */
 function siteUrl($deep = 0)
 {
     //當自動生成出錯的時候,可讓用戶通過常量XWB_S_SITEURL自定義。末尾需要加/
     if (0 === $deep && defined('XWB_S_SITEURL')) {
         return XWB_S_SITEURL;
     }
     //DOCUMENT_ROOT在IIS的CGI/FASTCGI模式下無定義
     $v1 = isset($_SERVER['DOCUMENT_ROOT']) ? str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']) : '';
     $v2 = str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']);
     $deep += 1;
     //$p = $_SERVER['SERVER_PORT']=='80' ? '' : ':'.$_SERVER['SERVER_PORT'];
     $url = XWB_plugin::baseUrl();
     $pUrl = str_replace($v1, '', $v2);
     if ($pUrl == $v2) {
         $pUrl = $_SERVER['SCRIPT_NAME'];
     }
     $pUrl = '/' . ltrim($pUrl, '/');
     $url = $url . preg_replace("#(/[^/]+){" . $deep . "}\$#", '/', $pUrl);
     return $url;
 }
開發者ID:YouthAndra,項目名稱:huaitaoo2o,代碼行數:24,代碼來源:core.class.php


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