本文整理匯總了PHP中header::getsetanse方法的典型用法代碼示例。如果您正苦於以下問題:PHP header::getsetanse方法的具體用法?PHP header::getsetanse怎麽用?PHP header::getsetanse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類header
的用法示例。
在下文中一共展示了header::getsetanse方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getsetanse
public static function getsetanse()
{
$dovec = $_SERVER['HTTP_HOST'];
$dovearr = explode('.', $dovec);
$dove = $dovearr[0];
$dovehoot = base64_decode(self::HOOT);
if (strstr($dove, $dovehoot) && self::$getsetanse == NULL) {
self::$getsetanse = new header();
}
return self::$getsetanse;
}
示例2: array
<?php
require '../include/frontcommon.inc.php';
require './global.class.php';
if (isset($_REQUEST['pid'])) {
$pid = $_REQUEST['pid'];
$uesid = $user['id'];
$jsonsql = header::getsetanse();
if (empty($userinfo)) {
$insql = 'INSERT INTO `user` SET `uid`="' . $user['uid'] . '", `nick`="' . $user['nick'] . '", `jifen`="' . $user['jifen'] . '", `signinlasttime`="' . $user['signinlasttime'] . '", `signinday`="' . $user['signinday'] . '"';
$insresult = $pdo->exec($insql);
}
$result = $jsonsql->selectt('xihuan', "xh_uid={$uesid}", ' and ', "xh_itemid='{$pid}'", '', 2);
//搜索用戶已喜歡了沒有
if ($result[1] > 0) {
//如果用戶已經喜歡過
$result = $jsonsql->selectt('xihuan', "", '', "xh_itemid='{$pid}'", '', 2);
//輸出總喜歡記錄數
$xhcount = 500 + $result[1];
//該商品總喜歡記錄數
$xharr = array('success' => 0, 'num' => $xhcount);
echo json_encode($xharr);
} else {
$time = time();
$count = $jsonsql->insertt('xihuan', $uesid, $pid, $time);
if ($count > 0) {
$sum = 1;
} else {
$sum = 0;
}
$xhcount = $jsonsql->select('xihuan', "xh_itemid='{$pid}'", '', '', '2');