本文整理汇总了PHP中WSTDomain函数的典型用法代码示例。如果您正苦于以下问题:PHP WSTDomain函数的具体用法?PHP WSTDomain怎么用?PHP WSTDomain使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了WSTDomain函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: WSTNavigation
/**
* 获取指定位置的导航菜单
* @param int $type 导航位置
*/
function WSTNavigation($type = 0)
{
$URL_HTML_SUFFIX = C('URL_HTML_SUFFIX');
$cururl = U(MODULE_NAME . "/" . CONTROLLER_NAME . "/" . ACTION_NAME);
$cururl = str_ireplace("." . $URL_HTML_SUFFIX, '', $cururl);
$areaId2 = (int) session('areaId2');
$rs = F('navigation/' . $areaId2);
if (!$rs) {
$m = M();
//获取所在省份
$sql = "select parentId from __PREFIX__areas where areaId=" . $areaId2;
$areaId1Rs = $m->query($sql);
$areaId1 = (int) $areaId1Rs[0]['parentId'];
$sql = "select navType,navTitle,navUrl,isShow,isOpen \n\t\t from __PREFIX__navs where isShow=1 and (areaId1=0 or areaId1=" . $areaId1 . ") and (areaId2=0 or areaId2=" . $areaId2 . ") \n\t\t order by navType asc,navSort asc";
$rs = $m->query($sql);
F('navigation/' . $areaId2, $rs);
}
foreach ($rs as $key => $v) {
$rs[$key]['url'] = $cururl;
if (stripos($v['navUrl'], 'https://') === false && stripos($v['navUrl'], 'http://') === false) {
$rs[$key]['navUrl'] = WSTDomain() . "/" . $rs[$key]['navUrl'];
}
$rs[$key]['active'] = stripos($rs[$key]['navUrl'], $cururl) !== false ? 1 : 0;
$rs[$key]['end'] = $key == count($rs) - 1 ? 1 : 0;
}
//分组
$data = array();
foreach ($rs as $key => $v) {
$data[$v['navType']][] = $v;
}
return $data[$type];
}
示例2: WSTDomain
</li>
</ul>
<span class="clr"></span>
</div>
</div>
<div style="height:132px;">
<div id="mainsearchbox" style="text-align:center;">
<div id="wst-search-pbox">
<div style="float:left;width:240px;" class="wst-header-car">
<a href='<?php
echo WSTDomain();
?>
'>
<img id="wst-logo" width='240' height='132' src="<?php
echo WSTDomain();
?>
/<?php
echo $CONF['mallLogo'];
?>
"/>
</a>
</div>
<div id="wst-search-container">
<div id="wst-search-type-box">
<input id="wst-search-type" type="hidden" value="<?php
echo $searchType;
?>
"/>
<div id="wst-panel-goods" class="<?php
if ($searchType == 1) {
示例3: array
<?php
return array(define('WEB_HOST', WSTDomain()), 'WxPayConf_pub' => array('JS_API_CALL_URL' => WEB_HOST . '/index.php/Home/WxJsAPI/jsApiCall', 'SSLCERT_PATH' => WEB_HOST . '/ThinkPHP/Library/Vendor/WxPayPubHelper/cacert/apiclient_cert.pem', 'SSLKEY_PATH' => WEB_HOST . '/ThinkPHP/Library/Vendor/WxPayPubHelper/cacert/apiclient_key.pem', 'NOTIFY_URL' => WEB_HOST . '/index.php/Home/WxNative2/notify', 'CURL_TIMEOUT' => 30));
示例4: getWSTMallVersion
/**
* 获取当前版本
*/
public function getWSTMallVersion()
{
$this->isAjaxLogin();
$version = C('WST_VERSION');
$key = C('WST_MD5');
$license = $GLOBALS['CONFIG']['mallLicense'];
$content = file_get_contents(C('WST_WEB') . '/index.php?m=Api&c=Download&a=getLastVersion&version=' . $version . '&version_md5=' . $key . "&license=" . $license . "&host=" . WSTDomain());
$json = json_decode($content, true);
if ($json['version'] == $version) {
$json['version'] = "same";
}
$this->ajaxReturn($json);
}
示例5: getLevelImg
private function getLevelImg($levle)
{
if ($levle == 0) {
return $img = '<img src="' . WSTDomain() . '/Apps/Home/View/default/images/level/l0.gif" height="25" width="25">';
} else {
return $img = '<img src="' . WSTDomain() . '/Apps/Home/View/default/images/level/l' . $levle . '.gif" height="25" width="25">';
}
}