Пример #1
0
 /**
  * Gets the WP debug.log content
  *
  * @author         Jeff Behnke <*****@*****.**>
  * @copyright  (c) 2009-15 ValidWebs.com
  *
  * Created:    12/5/15, 2:44 AM
  *
  * @param $get
  *
  * @return bool
  */
 public function get_wp_debug_log($get)
 {
     if (isset($get['host']) && isset($get['debug_log'])) {
         $log = false;
         $type = check_host_type($get['host']);
         if (isset($type['key'])) {
             if (isset($type['path'])) {
                 $debug_log['path'] = VVV_WEB_ROOT . '/' . $type['key'] . '/' . $type['path'] . '/wp-content/debug.log';
             } else {
                 $debug_log['path'] = VVV_WEB_ROOT . '/' . $type['key'] . '/wp-content/debug.log';
             }
         } else {
             $host = strstr($get['host'], '.', true);
             $debug_log['path'] = VVV_WEB_ROOT . '/' . $host . '/htdocs/wp-content/debug.log';
         }
         if (isset($debug_log['path']) && file_exists($debug_log['path'])) {
             $log = get_php_errors(21, 140, $debug_log['path']);
         }
         if (is_array($log)) {
             $debug_log['lines'] = format_php_errors($log);
         }
         return $debug_log;
     }
     return false;
 }
Пример #2
0
<?php

/**
 *
 * PHP version 5
 *
 * Created: 12/7/15, 3:56 PM
 *
 * LICENSE:
 *
 * @author         Jeff Behnke <*****@*****.**>
 * @copyright  (c) 2015 ValidWebs.com
 *
 * dashboard
 * php-error-logs.php
 */
?>
	<div class="error_logs"><h3>Last 10 PHP Errors</h3>
		<?php 
$lines = get_php_errors();
$lines = format_php_errors($lines);
echo $lines;
?>
	</div>
<?php 
// End php-error-logs.php