本文整理汇总了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);
}