當前位置: 首頁>>代碼示例>>PHP>>正文


PHP IPSDebug::getMessages方法代碼示例

本文整理匯總了PHP中IPSDebug::getMessages方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSDebug::getMessages方法的具體用法?PHP IPSDebug::getMessages怎麽用?PHP IPSDebug::getMessages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IPSDebug的用法示例。


在下文中一共展示了IPSDebug::getMessages方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: html_showDebugInfo

 /**
  * Returns debug data
  *
  * @access	protected
  * @return	string		Debug HTML
  */
 public function html_showDebugInfo()
 {
     $input = "";
     $queries = "";
     $sload = "";
     $stats = "";
     //-----------------------------------------
     // Form & Get & Skin
     //-----------------------------------------
     if ($this->settings['debug_level'] >= 2) {
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>IPSDebug сообщения</div><div class='row1' style='padding:6px'>\n";
         foreach (IPSDebug::getMessages() as $dx => $entry) {
             $stats .= "<strong>{$entry}</strong><br />\n";
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>IPSMember кеши</div><div class='row1' style='padding:6px'>\n";
         if (is_array(IPSMember::$debugData)) {
             foreach (IPSMember::$debugData as $entry) {
                 $stats .= "<strong>{$entry}</strong><br />\n";
             }
         }
         $stats .= "</div>\n</div>";
         /* Included Files */
         if (function_exists('get_included_files')) {
             $__files = get_included_files();
             $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>(" . count($__files) . ") подключенных файлов</div><div class='row1' style='padding:6px'>\n";
             foreach ($__files as $__f) {
                 $stats .= "<strong>{$__f}</strong><br />";
             }
             $stats .= '</div></div>';
         }
         /* Caches */
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Загруженных кешей</div><div class='row1' style='padding:6px'>\n";
         $_total = 0;
         if (is_array($this->cache->debugInfo)) {
             foreach ($this->cache->debugInfo as $key => $data) {
                 $_size = $data['size'];
                 $_total += $_size;
                 $stats .= "<strong>{$key}</strong> - " . IPSLib::sizeFormat($_size) . "<br />\n";
             }
         }
         $stats .= "<strong>ИТОГО: " . IPSLib::sizeFormat($_total) . "</strong></div>\n</div>";
         /* Loaded classes */
         $loadedClasses = $this->registry->getLoadedClassesAsArray();
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Загруженные классы через ipsRegistry::getClass()</div><div class='row1' style='padding:6px'>\n";
         if (is_array($loadedClasses)) {
             foreach ($loadedClasses as $entry) {
                 $stats .= "<strong>{$entry}</strong><br />\n";
             }
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>FORM и GET данные</div><div class='row1' style='padding:6px'>\n";
         foreach ($this->request as $k => $v) {
             if (in_array(strtolower($k), array('pass', 'password'))) {
                 $v = '*******';
             }
             $stats .= "<strong>{$k}</strong> = {$v}<br />\n";
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>SKIN, MEMBER & TASK Info</div><div class='row1' style='padding:6px'>\n";
         while (list($k, $v) = each($this->skin)) {
             if (is_array($v)) {
                 continue;
             }
             if (strlen($v) > 120) {
                 $v = substr($v, 0, 120) . '...';
             }
             $stats .= "<strong>{$k}</strong> = " . IPSText::htmlspecialchars($v) . "<br />\n";
         }
         //-----------------------------------------
         // Stop E_ALL moaning...
         //-----------------------------------------
         $cache = $this->caches['systemvars'];
         $cache['task_next_run'] = $cache['task_next_run'] ? $cache['task_next_run'] : 0;
         $stats .= "<b>Следующая задача</b> = " . $this->registry->getClass('class_localization')->getDate($cache['task_next_run'], 'LONG') . "\n<br /><b>Время</b> = " . $this->registry->getClass('class_localization')->getDate(time(), 'LONG');
         $stats .= "<br /><b>Сейчас</b> = " . time();
         $stats .= "<p>Пользователь: last_visit: " . $this->memberData['last_visit'] . " / " . $this->registry->getClass('class_localization')->getDate($this->memberData['last_visit'], 'LONG') . "</p>";
         $stats .= "<p>Пользователь: uagent_key: " . $this->memberData['userAgentKey'] . "</p>";
         $stats .= "<p>Пользователь: uagent_type: " . $this->memberData['userAgentType'] . "</p>";
         $stats .= "<p>Пользователь: uagent_version: " . $this->memberData['userAgentVersion'] . "</p>";
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Загруженные PHP шаблоны</div><div class='row1' style='padding:6px'>\n";
         $stats .= "<strong>" . implode(", ", array_keys($this->output->compiled_templates)) . "</strong><br />\n";
         $stats .= "<strong>" . implode(", ", array_keys($this->output->loaded_templates)) . "</strong><br />\n";
         $stats .= "<strong>" . implode(", ", array_values($this->registry->getClass('class_localization')->loaded_lang_files)) . "</strong><br />\n";
         $stats .= "</div>\n</div>";
     }
     //-----------------------------------------
     // SQL
     //-----------------------------------------
     if ($this->settings['debug_level'] >= 3) {
         $stats .= "<br />\n<div class='tableborder' style='overflow:auto'>\n<div class='subtitle'>Запросы</div><div class='row1' style='padding:6px'>";
         foreach ($this->DB->obj['cached_queries'] as $q) {
             $q = htmlspecialchars($q);
//.........這裏部分代碼省略.........
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:101,代碼來源:htmlOutput.php

示例2: html_showDebugInfo

 /**
  * Returns debug data
  *
  * @access	private
  * @return	string		Debug HTML
  */
 public function html_showDebugInfo()
 {
     $input = "";
     $queries = "";
     $sload = "";
     $stats = "";
     //-----------------------------------------
     // Form & Get & Skin
     //-----------------------------------------
     /* Admins only */
     if (!$this->memberData['g_access_cp']) {
         //return '';
     }
     if ($this->settings['debug_level'] >= 2) {
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>IPSDebug Messages</div><div class='row1' style='padding:6px'>\n";
         foreach (IPSDebug::getMessages() as $dx => $entry) {
             $stats .= "<strong>{$entry}</strong><br />\n";
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>IPSMember Cache Actions</div><div class='row1' style='padding:6px'>\n";
         if (is_array(IPSMember::$debugData)) {
             foreach (IPSMember::$debugData as $entry) {
                 $stats .= "<strong>{$entry}</strong><br />\n";
             }
         }
         $stats .= "</div>\n</div>";
         /* Included Files */
         if (function_exists('get_included_files')) {
             $__files = get_included_files();
             $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>(" . count($__files) . ") Included Files</div><div class='row1' style='padding:6px'>\n";
             foreach ($__files as $__f) {
                 $stats .= "<strong>{$__f}</strong><br />";
             }
             $stats .= '</div></div>';
         }
         /* Caches */
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Loaded Caches</div><div class='row1' style='padding:6px'>\n";
         $_total = 0;
         if (is_array($this->cache->debugInfo)) {
             foreach ($this->cache->debugInfo as $key => $data) {
                 $_size = $data['size'];
                 $_total += $_size;
                 $stats .= "<strong>{$key}</strong> - " . IPSLib::sizeFormat($_size) . "<br />\n";
             }
         }
         $stats .= "<strong>TOTAL: " . IPSLib::sizeFormat($_total) . "</strong></div>\n</div>";
         /* Loaded classes */
         $loadedClasses = $this->registry->getLoadedClassesAsArray();
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Loaded Classes In ipsRegistry::getClass()</div><div class='row1' style='padding:6px'>\n";
         if (is_array($loadedClasses)) {
             foreach ($loadedClasses as $entry) {
                 $stats .= "<strong>{$entry}</strong><br />\n";
             }
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>FORM and GET Input</div><div class='row1' style='padding:6px'>\n";
         foreach ($this->request as $k => $v) {
             if (in_array(strtolower($k), array('pass', 'password'))) {
                 $v = '*******';
             }
             $stats .= "<strong>{$k}</strong> = {$v}<br />\n";
         }
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>SKIN, MEMBER & TASK Info</div><div class='row1' style='padding:6px'>\n";
         while (list($k, $v) = each($this->skin)) {
             if (is_array($v)) {
                 continue;
             }
             if (strlen($v) > 120) {
                 $v = substr($v, 0, 120) . '...';
             }
             $stats .= "<strong>{$k}</strong> = " . IPSText::htmlspecialchars($v) . "<br />\n";
         }
         //-----------------------------------------
         // Stop E_ALL moaning...
         //-----------------------------------------
         $cache = $this->caches['systemvars'];
         $cache['task_next_run'] = $cache['task_next_run'] ? $cache['task_next_run'] : 0;
         $stats .= "<b>Next task</b> = " . $this->registry->getClass('class_localization')->getDate($cache['task_next_run'], 'LONG') . "\n<br /><b>Time now</b> = " . $this->registry->getClass('class_localization')->getDate(time(), 'LONG');
         $stats .= "<br /><b>Timestamp Now</b> = " . time();
         $stats .= "<p>MEMBER: last_visit: " . $this->memberData['last_visit'] . " / " . $this->registry->getClass('class_localization')->getDate($this->memberData['last_visit'], 'LONG') . "</p>";
         $stats .= "<p>MEMBER: uagent_key: " . $this->memberData['userAgentKey'] . "</p>";
         $stats .= "<p>MEMBER: uagent_type: " . $this->memberData['userAgentType'] . "</p>";
         $stats .= "<p>MEMBER: uagent_version: " . $this->memberData['userAgentVersion'] . "</p>";
         $stats .= "</div>\n</div>";
         $stats .= "<br />\n<div class='tableborder'>\n<div class='subtitle'>Loaded PHP Templates</div><div class='row1' style='padding:6px'>\n";
         $stats .= "<strong>" . implode(", ", array_keys($this->output->compiled_templates)) . "</strong><br />\n";
         $stats .= "<strong>" . implode(", ", array_keys($this->output->loaded_templates)) . "</strong><br />\n";
         $stats .= "<strong>" . implode(", ", array_values($this->registry->getClass('class_localization')->loaded_lang_files)) . "</strong><br />\n";
         $stats .= "</div>\n</div>";
     }
     //-----------------------------------------
     // SQL
     //-----------------------------------------
//.........這裏部分代碼省略.........
開發者ID:dalandis,項目名稱:Visualization-of-Cell-Phone-Locations,代碼行數:101,代碼來源:htmlOutput.php


注:本文中的IPSDebug::getMessages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。