本文整理汇总了PHP中CLog::notice方法的典型用法代码示例。如果您正苦于以下问题:PHP CLog::notice方法的具体用法?PHP CLog::notice怎么用?PHP CLog::notice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLog
的用法示例。
在下文中一共展示了CLog::notice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: encryptUrl
function encryptUrl($url, $maxRandomStrLen = '', $encKeyStr = '', $encIvecStr = '')
{
$status = -1;
$logArr['func'] = "encryptUrl";
/**
* encryptUrl random string length
* @var long
*/
if (empty($maxRandomStrLen) || intval($maxRandomStrLen) < 1) {
$maxRandomStrLen = CSmarty::getMaxRandomStrLen();
}
/**
* encryptUrl key string, ie: token
* @var string
*/
if (empty($encKeyStr)) {
$encKeyStr = CSmarty::getEncKeyStr();
}
if (empty($encIvecStr)) {
$encIvecStr = CSmarty::getEncIvecStr();
}
$randState = CSmarty::getRandState();
$flag = CSmarty::getFlag();
$logArr['url'] = $url;
$logArr['encKeyStr'] = $encKeyStr;
$logArr['maxRandomStrLen'] = $maxRandomStrLen;
$logArr['randState'] = $randState;
$logArr['flag'] = $flag;
$url = trim($url);
if (strlen($url) == 0) {
return false;
}
$result = hilight_encryptUrl($url, $encKeyStr, $encIvecStr, $maxRandomStrLen, $randState, $flag);
$logArr['result'] = $result;
if ($GLOBALS['ENC_LOG']) {
CLog::notice("hilight_encryptUrl end", $status, $logArr, 1);
}
if (false == $result) {
CLog::warning("fail to call hilight_encryptUrl", $status, $logArr, 1);
}
$maxEncWarningLen = CSmarty::getMaxEncWarningLen();
$length = strlen($result);
/**
* if $length is greater than the max length of url, then return false,ie fail to encrypt
*
*/
if ($maxEncWarningLen > 0 && $length > $maxEncWarningLen) {
$logArr['length'] = $length;
$logArr['maxEncWarningLen'] = $maxEncWarningLen;
CLog::warning("encryption url len is {$length}, limit {$maxEncWarningLen}", $status, $logArr, 1);
}
return $result;
}