本文整理汇总了PHP中CLog::setQueryId方法的典型用法代码示例。如果您正苦于以下问题:PHP CLog::setQueryId方法的具体用法?PHP CLog::setQueryId怎么用?PHP CLog::setQueryId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLog
的用法示例。
在下文中一共展示了CLog::setQueryId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addISLog
public function addISLog($data)
{
$arrISparams = $data['uiData']['queryInfo']['isParams'];
$GLOBALS['logArr']['is_mod'] = isset($arrISparams['mod']) ? $arrISparams['mod'] : -1;
$GLOBALS['logArr']['is_isbd'] = isset($arrISparams['isbd']) ? $arrISparams['isbd'] : '0';
$GLOBALS['logArr']['is_cqid'] = isset($arrISparams['cqid']) ? $arrISparams['cqid'] : '0';
$GLOBALS['logArr']['is_isid'] = isset($arrISparams['isid']) ? $arrISparams['isid'] : '0';
$GLOBALS['logArr']['is_chk'] = isset($arrISparams['chk']) ? $arrISparams['chk'] : '0';
$GLOBALS['logArr']['is_ver'] = isset($arrISparams['ver']) ? $arrISparams['ver'] : '0';
// $GLOBALS['logArr']['is_pstg'] = ($arrISparams['mod'] === IS_PRE_REQ) ? intval($_GET['pstg']) : -1;
$GLOBALS['logArr']['is_f4s'] = isset($arrISparams['f4s']) ? $arrISparams['f4s'] : '0';
$GLOBALS['logArr']['is_predict_status'] = isset($arrISparams['is_predict_status']) ? $arrISparams['is_predict_status'] : '0';
$GLOBALS['logArr']['is_sug_status'] = isset($arrISparams['sug_status']) ? $arrISparams['sug_status'] : '-1';
$GLOBALS['logArr']['is_csq'] = intval($arrISparams['csq']);
$GLOBALS['logArr']['is_pstg'] = isset($arrISparams['pstg']) ? intval($arrISparams['pstg']) : -1;
$GLOBALS['logArr']['is_querysign'] = $data['uiData']['queryInfo']['querySign'];
// $GLOBALS['logArr']['is_sug_num'] = empty($arrISparams['sug']) ? 0 : count($arrISparams['sug']);
if (!isset($GLOBALS['logArr']['word'])) {
$GLOBALS['logArr']['word'] = $data['uiData']['queryInfo']['queryWord'];
}
if (!isset($GLOBALS['logArr']['baiduId'])) {
$GLOBALS['logArr']['baiduId'] = $data['uiData']['queryInfo']['baiduId'];
}
$strQueryId = CLog::getQueryId();
if (empty($strQueryId)) {
CLog::setQueryId($data['uiData']['queryInfo']['queryId']);
}
if (!isset($GLOBALS['logArr']['sids'])) {
$strSids = '';
foreach ($data['uiData']['queryInfo']['samplingId'] as $intSid) {
if (!empty($strSids)) {
$strSids .= '_';
}
$strSids .= $intSid;
}
$GLOBALS['logArr']['sids'] = $strSids;
}
$GLOBALS['logArr']['ua'] = empty($_SERVER['HTTP_USER_AGENT']) ? '' : str_replace(array('[', ']'), ' ', $_SERVER['HTTP_USER_AGENT']);
return true;
}