• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP trace函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中trace函数的典型用法代码示例。如果您正苦于以下问题:PHP trace函数的具体用法?PHP trace怎么用?PHP trace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了trace函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: query_cache

function query_cache($options)
{
    global $QUERY_CACHE_CACHE;
    if (strpos('u.birthday < 1970', $options['query']) === true) {
        die('ERROR!!!');
    }
    $options['category'] = isset($options['category']) ? $options['category'] : 'other';
    $options['max_delay'] = isset($options['max_delay']) ? $options['max_delay'] : 300;
    $path = PATHS_INCLUDE . 'cache/query_cache/' . $options['category'] . '/';
    $filename = md5($options['query']) . '.phpserialized';
    if (isset($QUERY_CACHE_CACHE[$filename])) {
        return $QUERY_CACHE_CACHE[$filename];
    }
    if (!is_dir($path)) {
        mkdir($path);
    }
    if (!file_exists($path . $filename)) {
        trace('new_query_cache_' . $options['category'], $options['query']);
    }
    if (filemtime($path . $filename) < time() - $options['max_delay']) {
        $result = mysql_query($options['query']) or report_sql_error($query, __FILE__, __LINE__);
        while ($row = mysql_fetch_assoc($result)) {
            $data[] = $row;
        }
        $serialized = serialize($data);
        //trace('query_cache', 'Creating file for query: ' . $options['query']);
        file_put_contents($path . $filename, $serialized);
    } else {
        $data = unserialize(file_get_contents($path . $filename));
    }
    $QUERY_CACHE_CACHE[$filename] = $data;
    return $data;
}
开发者ID:Razze,项目名称:hamsterpaj,代码行数:33,代码来源:cache.lib.php


示例2: getAllPlugins

 /**
  * Return array of all plugins based on plugin files on filesystem
  *
  * @param none
  * @return array
  */
 static function getAllPlugins()
 {
     trace(__FILE__, 'getAllPlugins()');
     $results = array();
     $dir = APPLICATION_PATH . '/plugins';
     $dirs = get_dirs($dir, false);
     foreach ((array) $dirs as $plugin) {
         if (file_exists($dir . '/' . $plugin . '/init.php') && is_file($dir . '/' . $plugin . '/init.php')) {
             $results[$plugin] = '-';
         }
     }
     // now sort by name
     ksort($results);
     // now get activated plugins
     $conditions = array('`installed` = 1');
     $plugins = Plugins::findAll(array('conditions' => $conditions));
     trace(__FILE__, 'getAllPlugins() - all plugins retrieved from database');
     foreach ((array) $plugins as $plugin) {
         trace(__FILE__, 'getAllPlugins() - foreach: ' . $plugin->getName());
         if (array_key_exists($plugin->getName(), $results)) {
             $results[$plugin->getName()] = $plugin->getPluginId();
         } else {
             // TODO : remove from DB here??
         }
     }
     return $results;
 }
开发者ID:469306621,项目名称:Languages,代码行数:33,代码来源:Plugins.class.php


示例3: run

 public function run(&$_data)
 {
     $engine = strtolower(C('TMPL_ENGINE_TYPE'));
     if ('think' == $engine) {
         //[sae] 采用Think模板引擎
         if ($this->checkCache($_data['file'])) {
             // 缓存有效
             SaeMC::include_file(md5($_data['file']) . C('TMPL_CACHFILE_SUFFIX'), $_data['var']);
         } else {
             $tpl = Think::instance('ThinkTemplate');
             // 编译并加载模板文件
             $tpl->fetch($_data['file'], $_data['var']);
         }
     } else {
         // 调用第三方模板引擎解析和输出
         $class = 'Template' . ucwords($engine);
         if (is_file(CORE_PATH . 'Driver/Template/' . $class . '.class.php')) {
             // 内置驱动
             $path = CORE_PATH;
         } else {
             // 扩展驱动
             $path = EXTEND_PATH;
         }
         if (require_cache($path . 'Driver/Template/' . $class . '.class.php')) {
             $tpl = new $class();
             $tpl->fetch($_data['file'], $_data['var']);
         } else {
             // 类没有定义
             throw_exception(L('_NOT_SUPPERT_') . ': ' . $class);
         }
     }
     //[sae] 添加trace信息。
     trace(array('[SAE]核心缓存' => $_SERVER['HTTP_APPVERSION'] . '/' . RUNTIME_FILE, '[SAE]模板缓存' => $_SERVER['HTTP_APPVERSION'] . '/' . md5($_data['file']) . C('TMPL_CACHFILE_SUFFIX')));
 }
开发者ID:nexteee,项目名称:php,代码行数:34,代码来源:ParseTemplateBehavior.class.php


示例4: _initialize

 /**
  * 此方法是基础控制器中定义好的初始化方法,可以做一些具体操作之前的初始化工作。
  * 我们在这里进行标题的统一配置和数据传输。
  */
 public function _initialize()
 {
     trace(ACTION_NAME);
     $meta_titles = array('index' => '菜单管理', 'add' => '添加菜单', 'edit' => '修改菜单');
     $meta_title = isset($meta_titles[ACTION_NAME]) ? $meta_titles[ACTION_NAME] : '菜单管理';
     $this->assign('meta_title', $meta_title);
 }
开发者ID:kunx-edu,项目名称:tp1030,代码行数:11,代码来源:MenuController.class.php


示例5: send

 public static function send($msg, $detail, $level = self::NOTIC, $mobile = null)
 {
     //判断是否定义需要发送短信
     if (!in_array($level, explode(',', C('SMS_ALERT_LEVEL')))) {
         return;
     }
     //判断发送频率
     $mc = memcache_init();
     $is_send = $mc->get('think_sms_send');
     //如果已经发送,则不发送
     if ($is_send === 'true') {
         $status = 'not send';
     } else {
         $sms = apibus::init('sms');
         if (is_null($mobile)) {
             $mobile = C('SMS_ALERT_MOBILE');
         }
         $mc = memcache_init();
         $obj = $sms->send($mobile, mb_substr(C('SMS_ALERT_SIGN') . $msg, 0, 65, 'utf-8'), "UTF-8");
         if ($sms->isError($obj)) {
             $status = 'failed';
         } else {
             $status = 'success';
             $mc->set('think_sms_send', 'true', 0, C('SMS_ALERT_INTERVAL'));
         }
     }
     //记录日志
     if (C('LOG_RECORD')) {
         trace($msg . ';detail:' . $detail . '【status:' . $status . '】', '短信发送', 'SAE', true);
     } else {
         Log::write($msg . ';detail:' . $detail . '【status:' . $status . '】', 'SEND_SMS');
     }
 }
开发者ID:lxp521125,项目名称:TP-Admin,代码行数:33,代码来源:Sms.class.php


示例6: run

 public function run(&$_data)
 {
     $engine = strtolower(C('TMPL_ENGINE_TYPE'));
     $_content = empty($_data['content']) ? $_data['file'] : $_data['content'];
     $_data['prefix'] = !empty($_data['prefix']) ? $_data['prefix'] : C('TMPL_CACHE_PREFIX');
     if ('think' == $engine) {
         // 采用Think模板引擎
         if (!empty($_data['content']) && $this->checkContentCache($_data['content'], $_data['prefix']) || $this->checkCache($_data['file'], $_data['prefix'])) {
             // 缓存有效
             //[cluster]载入模版缓存文件
             ThinkFS::include_file(C('CACHE_PATH') . $_data['prefix'] . md5($_content) . C('TMPL_CACHFILE_SUFFIX'), $_data['var']);
         } else {
             $tpl = Think::instance('ThinkTemplate');
             // 编译并加载模板文件
             $tpl->fetch($_content, $_data['var'], $_data['prefix']);
         }
     } else {
         // 调用第三方模板引擎解析和输出
         $class = 'Template' . ucwords($engine);
         if (class_exists($class)) {
             $tpl = new $class();
             $tpl->fetch($_content, $_data['var']);
         } else {
             // 类没有定义
             throw_exception(L('_NOT_SUPPERT_') . ': ' . $class);
         }
     }
     //[cluster] 增加有用的trace信息
     trace(RUNTIME_FILE, '核心编译缓存KEY', 'DEBUG');
     trace(C('CACHE_PATH') . $_data['prefix'] . md5($_content) . C('TMPL_CACHFILE_SUFFIX'), '模板缓存KEY', 'DEBUG');
 }
开发者ID:xibaachao,项目名称:1bz,代码行数:31,代码来源:ParseTemplateBehavior.class.php


示例7: talkpage

 public function talkpage($tid)
 {
     if (IS_POST) {
         if (I('post.type') == 'create') {
             if (D('TalkComment')->add_new($tid, I('post.content'))) {
                 $this->success('发表成功');
             } else {
                 $this->error('发表失败');
             }
         }
     } else {
         trace('user_auth_sign', session('user_auth_sign'));
         $talk_class = M('TalkClass')->where('display=1')->order('id')->select();
         $talk_pagecon = M('Talk')->where('id=%d', $tid)->find();
         $talk_count = M('TalkComment')->where('tid=%d', $tid)->count();
         $talk_comment = M('TalkComment')->where('tid=%d', $tid)->order('id')->limit(I('get.numb'), I('get.numb') + 30)->select();
         $talk_page_numb = I('get.numb');
         $this->assign('tid', $tid);
         $this->assign('talk_class', $talk_class);
         $this->assign('talk_count', $talk_count);
         $this->assign('talk_comment', $talk_comment);
         $this->assign('talk_pagecon', $talk_pagecon);
         $this->assign('talk_page_numb', $talk_page_numb);
         $this->display();
     }
 }
开发者ID:smilecc,项目名称:ahsxcg,代码行数:26,代码来源:TalkController.class.php


示例8: check_max_calls

/**
 * If max_calls has been reached on any data sources, this function will
 * report it, save local data, and exit.
 */
function check_max_calls()
{
    if ($max = max_calls()) {
        trace("Reached call limit on data source(s) (bitmask {$max}). Exiting.");
        save_and_exit();
    }
}
开发者ID:netlife,项目名称:fatsync,代码行数:11,代码来源:misc.php


示例9: Gdn_ErrorHandler

/**
 *
 *
 * @param $errorNumber
 * @param $message
 * @param $file
 * @param $line
 * @param $arguments
 * @return bool|void
 * @throws Gdn_ErrorException
 */
function Gdn_ErrorHandler($errorNumber, $message, $file, $line, $arguments)
{
    $errorReporting = error_reporting();
    // Don't do anything for @supressed errors.
    if ($errorReporting === 0) {
        return;
    }
    if (($errorReporting & $errorNumber) !== $errorNumber) {
        if (function_exists('trace')) {
            trace(new \ErrorException($message, $errorNumber, $errorNumber, $file, $line), TRACE_NOTICE);
        }
        // Ignore errors that are below the current error reporting level.
        return false;
    }
    $fatalErrorBitmask = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR;
    if ($errorNumber & $fatalErrorBitmask) {
        // Convert all fatal errors to an exception
        throw new Gdn_ErrorException($message, $errorNumber, $file, $line, $arguments);
    }
    // All other unprocessed non-fatal PHP errors are possibly Traced and logged to the PHP error log file
    $nonFatalErrorException = new \ErrorException($message, $errorNumber, $errorNumber, $file, $line);
    if (function_exists('trace')) {
        trace($nonFatalErrorException, TRACE_NOTICE);
    }
    errorLog(formatErrorException($nonFatalErrorException));
}
开发者ID:vanilla,项目名称:vanilla,代码行数:37,代码来源:functions.error.php


示例10: parseLink

 public function parseLink($pUrl)
 {
     $parsers = array("AmazonFrParser" => '/^http:\\/\\/www\\.amazon\\.fr/', "LaRedouteFrParser" => '/^http:\\/\\/www\\.laredoute\\.fr/', "AsosFrParser" => '/^http:\\/\\/www\\.asos\\.fr/');
     $class = null;
     foreach ($parsers as $className => $regExp) {
         if (!preg_match($regExp, $pUrl, $matches)) {
             continue;
         }
         $class = "app\\main\\src\\data\\" . $className;
     }
     if ($class === null) {
         //Unknown shop
         return false;
     }
     $user_headers = array('User-Agent: ' . $_SERVER['HTTP_USER_AGENT'], 'Accept: ' . $_SERVER['HTTP_ACCEPT'], 'Accept-Encoding: ' . $_SERVER['HTTP_ACCEPT_ENCODING'], 'Accept-Language: ' . $_SERVER['HTTP_ACCEPT_LANGUAGE']);
     $context = stream_context_create(array('http' => array('ignore_errors' => true, 'method' => 'GET', 'header' => implode('\\r\\n', $user_headers))));
     $content = file_get_contents($pUrl, false, $context);
     if (empty($content)) {
         trace("nop empty response");
         return false;
     }
     $parsedData = $class::parse($content);
     if (empty($parsedData['canonical'])) {
         $parsedData['canonical'] = $pUrl;
     }
     if (strpos($parsedData['canonical'], 'http://') !== 0) {
         if (!preg_match('/^\\//', $parsedData['canonical'], $matches)) {
             $parsedData['canonical'] = '/' . $parsedData['canonical'];
         }
         $domain = explode('/', $pUrl);
         $parsedData['canonical'] = 'http://' . $domain[2] . $parsedData['canonical'];
     }
     return $parsedData;
 }
开发者ID:arno06,项目名称:Savely,代码行数:34,代码来源:model.ModelLink.php


示例11: initUserAttributes

 /**
  * @inheritdoc
  */
 protected function initUserAttributes()
 {
     $data = [];
     foreach (explode(" ", $this->scope) as $scope) {
         if (in_array($scope, $this->_userinfoscopes)) {
             $api = $this->api($scope, 'GET');
             if (ArrayHelper::getValue($api, 'status') !== "ok") {
                 Yii:
                 trace("Server error: " . print_r($api, true));
                 throw new InvalidResponseException($api, "error", print_r($api, true));
             }
             $apiData = ArrayHelper::getValue($api, 'data', []);
             if ($scope === "profile") {
                 if (ArrayHelper::getValue($apiData, 'blacklisted') !== false || ArrayHelper::getValue($apiData, 'quarantine') !== false || ArrayHelper::getValue($apiData, 'verified') !== true) {
                     Yii::trace("OAuth Failed. Provider V. Data: " . print_r($api, true), 'oauth');
                     throw new UserNotAllowedException("User is blacklisted, quarantined or not verified");
                 }
                 if (ArrayHelper::keyExists('enlid', $apiData)) {
                     if (ArrayHelper::getValue($apiData, 'enlid') === "null") {
                         Yii:
                         trace("enlid is null", 'oauth');
                         throw new UserNotAllowedException("Userprofile incomplete");
                     } else {
                         $data['id'] = ArrayHelper::getValue($data, 'enlid');
                     }
                 }
             }
             $data = array_merge($data, $apiData);
         }
     }
     return $data;
 }
开发者ID:aradiv,项目名称:yii2-authclient-v,代码行数:35,代码来源:VOAuth.php


示例12: keyword

 public function keyword($params)
 {
     if ($params['mp_id']) {
         $kmap['mp_id'] = $params['mp_id'];
         $kmap['keyword'] = $params['weObj']->getRevContent();
         //TODO:先只支持精确匹配,后续根据keyword_type字段增加模糊匹配
         $Keyword = M('Keyword')->where($kmap)->find();
         if ($Keyword['model'] && $Keyword['aim_id']) {
             //如果有指定模型,就用模型中的aim_id数据组装回复的内容
             $amap['id'] = $Keyword['aim_id'];
             $aimData = M($Keyword['model'])->where($amap)->find();
             $reData[0]['Title'] = $aimData['title'];
             $reData[0]['Description'] = $aimData['intro'];
             $reData[0]['PicUrl'] = get_cover_url($aimData['cover']);
             //'http://images.domain.com/templates/domaincom/logo.png';
             $reData[0]['Url'] = $aimData['url'];
             trace('wechat:keyword' . get_cover_url($aimData['cover']), '微信', 'DEBUG', true);
             $params['weObj']->news($reData);
         } elseif ($Keyword['addon']) {
             //TODO:没有指定模型,就用addon的配置信息组装回复的内容
             $amap['name'] = $Keyword['addon'];
             $aimData = M('Addons')->where($amap)->find();
             //插件信息组装回复,当然插件需要先安装了
             $reData[0]['Title'] = $aimData['title'];
             $reData[0]['Description'] = $aimData['description'];
             $reData[0]['PicUrl'] = get_addoncover_url($Keyword['addon']);
             //插件目录下放个回复封面图片例如jssdk插件中的cover.png
             $param['mp_id'] = $params['mp_id'];
             $reData[0]['Url'] = get_addonreply_url($Keyword['addon'], $param);
             $params['weObj']->news($reData);
         }
     } else {
     }
     // $params['weObj']->text("hello ");
 }
开发者ID:suhanyujie,项目名称:digitalOceanVps,代码行数:35,代码来源:KeywordAddon.class.php


示例13: _start_challenge

function _start_challenge($stationTag = null)
{
    if ($stationTag === null) {
        rest_sendBadRequestResponse(400, "missing station Tag");
        // doesn't return
    }
    $station = Station::getFromTag($stationTag);
    if ($station === false) {
        rest_sendBadRequestResponse(404, "can find station stationTag=" . $stationTag);
        // doesn't return
    }
    $stationType = new StationType($station->get('typeId'), -1);
    if ($stationType === false) {
        trace("can't find station type stationTag = " . $stationTag, __FILE__, __LINE__, __METHOD__);
        rest_sendBadRequestResponse(500, "can't find station type stationTag=" . $stationTag);
    }
    $json = json_getObjectFromRequest("POST");
    json_checkMembers("team_id,message", $json);
    $teamPIN = $json['team_id'];
    $team = Team::getFromPin($teamPIN);
    if ($team === false) {
        trace("_start_challenge can't find team teamPin=" . $teamPIN, __FILE__, __LINE__, __METHOD__);
        rest_sendBadRequestResponse(404, "team not found PIN=" . $teamPIN);
        // doesn't return
    }
    try {
        $xxxData = XXXData::factory($stationType->get('typeCode'));
        $msg = $xxxData->startChallenge($team, $station, $stationType);
        json_sendObject(array('message' => $msg));
    } catch (InternalError $ie) {
        rest_sendBadRequestResponse($ie->getCode(), $ie->getMessage());
    }
}
开发者ID:brata-hsdc,项目名称:brata.masterserver,代码行数:33,代码来源:start_challenge.php


示例14: _initialize

 /**
  * 此方法是基础控制器中定义好的初始化方法,可以做一些具体操作之前的初始化工作。
  * 我们在这里进行标题的统一配置和数据传输。
  */
 protected function _initialize()
 {
     trace(ACTION_NAME);
     $meta_titles = array('index' => '管理员管理', 'add' => '添加管理员', 'edit' => '修改管理员');
     $meta_title = isset($meta_titles[ACTION_NAME]) ? $meta_titles[ACTION_NAME] : '管理员管理';
     $this->assign('meta_title', $meta_title);
 }
开发者ID:kunx-edu,项目名称:tp1030,代码行数:11,代码来源:AdminController.class.php


示例15: debugfn

function debugfn($s)
{
    global $DEBUG_CALLS;
    if ($DEBUG_CALLS) {
        trace("-- Call to function '" . $s . "' -----------------------------------------------");
    }
}
开发者ID:dxyuniesky,项目名称:openerp-extra-6.1,代码行数:7,代码来源:openerp2vm.php


示例16: run

 public function run(&$_data)
 {
     $engine = strtolower(C('TMPL_ENGINE_TYPE'));
     $_content = empty($_data['content']) ? $_data['file'] : $_data['content'];
     $_data['prefix'] = !empty($_data['prefix']) ? $_data['prefix'] : C('TMPL_CACHE_PREFIX');
     if ('think' == $engine) {
         //[sae] 采用Think模板引擎
         if (!empty($_data['content']) && $this->checkContentCache($_data['content'], $_data['prefix']) || $this->checkCache($_data['file'], $_data['prefix'])) {
             // 缓存有效
             //[sae],为方便saeCacheBuilder编译, 模板编译缓存不分组
             SaeMC::include_file(C('CACHE_PATH') . $_data['prefix'] . md5($_content) . C('TMPL_CACHFILE_SUFFIX'), $_data['var']);
         } else {
             $tpl = Think::instance('ThinkTemplate');
             // 编译并加载模板文件
             $tpl->fetch($_content, $_data['var'], $_data['prefix']);
         }
     } else {
         // 调用第三方模板引擎解析和输出
         $class = 'Template' . ucwords($engine);
         if (class_exists($class)) {
             $tpl = new $class();
             $tpl->fetch($_content, $_data['var']);
         } else {
             // 类没有定义
             throw_exception(L('_NOT_SUPPERT_') . ': ' . $class);
         }
     }
     //[sae] 添加trace信息。
     if (!SAE_RUNTIME) {
         trace($_SERVER['HTTP_APPVERSION'] . '/' . RUNTIME_FILE, '核心缓存Mecache KEY', 'SAE');
         trace($_SERVER['HTTP_APPVERSION'] . '/' . C('CACHE_PATH') . $_data['prefix'] . md5($_content) . C('TMPL_CACHFILE_SUFFIX'), '模版缓存Mecache KEY', 'SAE');
     }
 }
开发者ID:jackycgq,项目名称:extend,代码行数:33,代码来源:ParseTemplateBehavior.class.php


示例17: showTrace

 /**
 +----------------------------------------------------------
 * 显示页面Trace信息
 +----------------------------------------------------------
 * @access private
 +----------------------------------------------------------
 */
 private function showTrace()
 {
     // 系统默认显示信息
     $log = Log::$log;
     $files = get_included_files();
     $trace = array('请求时间' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']), '当前页面' => __SELF__, '请求协议' => $_SERVER['SERVER_PROTOCOL'] . ' ' . $_SERVER['REQUEST_METHOD'], '运行信息' => $this->showTime(), '会话ID' => session_id(), '日志记录' => !empty($log) ? $log : '无日志记录', '加载文件' => $files);
     // 读取项目定义的Trace文件
     $traceFile = CONF_PATH . 'trace.php';
     if (is_file($traceFile)) {
         // 定义格式 return array('当前页面'=>$_SERVER['PHP_SELF'],'通信协议'=>$_SERVER['SERVER_PROTOCOL'],...);
         $trace = array_merge(include $traceFile, $trace);
     }
     // 设置trace信息
     trace($trace);
     $fire = array(array('', ''));
     foreach (trace() as $key => $value) {
         $fire[] = array($key, $value);
     }
     if (headers_sent($filename, $linenum)) {
         $fileInfo = !empty($filename) ? "(在{$filename}文件的第{$linenum}行)" : '';
         Log::record("已经有Http Header信息头输出{$fileInfo},请在你的入口文件加入ob_start() 或通过配置output_buffering,已确保headers不被提前输出");
     } else {
         fb(array('页面Trace信息', $fire), FirePHP::TABLE);
     }
 }
开发者ID:chenyongze,项目名称:januarybuy_develop,代码行数:32,代码来源:FireShowPageTraceBehavior.class.php


示例18: extractKeywords

function extractKeywords($sText, $iMinimumWordLength = 3, $iMinimumWordOccurrences = 0)
{
    $sText = preg_replace('/[^\\p{L}0-9 ]/', ' ', $sText);
    $sText = trim(preg_replace('/\\s+/', ' ', $sText));
    trace($sText);
    $aWords = explode(' ', $sText);
    $aKeywords = array();
    while (($sCurrentWord = array_shift($aWords)) !== null) {
        if (strlen($sCurrentWord) < $iMinimumWordLength) {
            continue;
        }
        $sCurrentWord = strtolower($sCurrentWord);
        if (array_key_exists($sCurrentWord, $aKeywords)) {
            $aKeywords[$sCurrentWord][1]++;
        } else {
            $aKeywords[$sCurrentWord] = array($sCurrentWord, 1);
        }
    }
    usort($aKeywords, 'keywordCountSort');
    $aFinalKeywords = array();
    foreach ($aKeywords as $aCurrentKeyword) {
        if ($aCurrentKeyword[1] < $iMinimumWordOccurrences) {
            break;
        }
        array_push($aFinalKeywords, $aCurrentKeyword[0]);
    }
    $aFinalKeywords = array_slice($aFinalKeywords, 0, 5, true);
    return array_reverse($aFinalKeywords);
}
开发者ID:mysmartcity,项目名称:flux,代码行数:29,代码来源:util.php


示例19: write

 /**
  * 日志写入接口
  * @access public
  * @param string $log 日志信息
  * @param string $destination  写入目标
  * @return void
  */
 public function write($log, $destination = '')
 {
     $now = date($this->config['log_time_format']);
     $logstr = "[{$now}] " . $_SERVER['REMOTE_ADDR'] . ' ' . $_SERVER['REQUEST_URI'] . "\r\n{$log}\r\n";
     trace($logstr, '日志');
     $this->sae->sync_log($logstr);
 }
开发者ID:lizhengqiang,项目名称:thinkphp,代码行数:14,代码来源:XsSae.class.php


示例20: __construct

 /**
  * ManagerGenerator constructor.
  *
  * @param Database $database Database query manager
  */
 public function __construct(Database $database)
 {
     $this->database = $database;
     foreach ($this->metadata() as $entity => $entityMetadata) {
         trace($this->createManager($entity, $entityMetadata), 1);
     }
 }
开发者ID:rmolodyko,项目名称:orm,代码行数:12,代码来源:ManagerGenerator.php



注:本文中的trace函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP trace_add函数代码示例发布时间:2022-05-23
下一篇:
PHP tra函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap