本文整理匯總了PHP中func::log方法的典型用法代碼示例。如果您正苦於以下問題:PHP func::log方法的具體用法?PHP func::log怎麽用?PHP func::log使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類func
的用法示例。
在下文中一共展示了func::log方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: SendQueue
static function SendQueue($sType, $aParams)
{
global $oDb;
$time = time();
switch ($sType) {
case 'subscribe':
$res = $oDb->execute('INSERT INTO ' . TABLE_ENOTIFY_SUBSCRIBE . ' (user_id, created)
VALUES(' . $aParams['user_id'] . ', ' . $time . ') ');
if (empty($res)) {
func::log('Ошибка sql-запроса CMail::SendQueue(' . $sType . ', uid=' . $aParams['user_id'] . '); ');
return false;
}
return true;
break;
}
return false;
}
示例2: log
protected function log($sMessage)
{
func::log($sMessage, 'bill.log');
}
示例3: error
function error($sText, $nBacktraceLevel = 1)
{
$msg = $this->_pdo->errorInfo();
$msg = "[{$sText}] ( " . (@$msg[0] . '.' . @$msg[1]) . ' : ' . (isset($msg[2]) ? $msg[2] : '') . ' )';
$aBacktrace = debug_backtrace();
if (isset($aBacktrace[$nBacktraceLevel])) {
$msg .= "<br /> {$aBacktrace[$nBacktraceLevel]['file']} [{$aBacktrace[$nBacktraceLevel]['line']}]";
}
trigger_error($msg, E_USER_ERROR);
func::log($msg);
}
示例4: getServiceSettings
/**
* Получение натроек услуги
* @param integer $nSvcID ID услуги
* @return array
*/
function getServiceSettings($nSvcID)
{
static $cache;
if (isset($cache[$nSvcID])) {
return $cache[$nSvcID];
}
$aResult = false;
do {
$aService = $this->db->one_array('SELECT id, type, keyword, settings, description FROM ' . TABLE_SERVICES . '
WHERE id = ' . $nSvcID);
if (empty($aService)) {
func::log('Ошибка получения информации об услуге #' . $nSvcID);
$aResult = false;
break;
}
$aSettings = !empty($aService['settings']) && is_string($aService['settings']) ? unserialize($aService['settings']) : array();
unset($aService['settings']);
$aResult = array_merge($aService, $aSettings);
if (isset($aResult['price'])) {
$aResult['price'] = floatval($aResult['price']);
}
} while (false);
return $cache[$nSvcID] = $aResult;
}
示例5: raiseError
/**
* Trigger a PEAR error
*
* To improve performances, the PEAR.php file is included dynamically.
* The file is so included only when an error is triggered. So, in most
* cases, the file isn't included and perfs are much better.
*
* @param string $msg error message
* @param int $code error code
* @access public
*/
function raiseError($msg, $code)
{
func::log($code . ': ' . $msg);
}