zencart 打开调试模式

<?php
/**
 * Very simple error logging to file
 *
 * Sometimes it is difficult to debug PHP background activities
 * However, using the PHP error logging facility we can store all PHP errors to a file, and then review separately.
 * Using this method, the debug details are stored at: /cache/myDEBUG-999999-00000000.log
 *
 * @package debug
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: enable_error_logging.php 16900 2010-07-14 22:38:38Z drbyte $
 */
/**
 * Specify the pages you wish to enable debugging for (ie: main_page=xxxxxxxx)
 * Using '*' will cause all pages to be enabled
 */
  $pages_to_debug[] = '*';
  $pages_to_debug[] = '';
  $pages_to_debug[] = '';
  $pages_to_debug[] = '';

/**
 * The path where the debug log file will be located
 * Default value is: DIR_FS_SQL_CACHE . '/myDEBUG-999999-00000000.log'
 * ... which puts it in the /cache/ folder:   /cache/myDEBUG-999999-00000000.log  (where 999999 is a random number, and 00000000 is the server's timestamp)
 */
  $debug_logfile_path = DIR_FS_SQL_CACHE . '/myDEBUG-' . time() . '-' . mt_rand(1000,999999) . '.log';

/**
 * Error reporting level to log
 * Default: E_ALL ^E_NOTICE
 */
  $errors_to_log = (version_compare(PHP_VERSION, 5.3, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE : version_compare(PHP_VERSION, 6.0, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT : E_ALL & ~E_NOTICE);


///// DO NOT EDIT BELOW THIS LINE /

//// DEBUG HANDLING //
  if (in_array('*', $pages_to_debug) || in_array($current_page_base, $pages_to_debug)) {
    @ini_set('log_errors', 0);          // store to file
    @ini_set('log_errors_max_len', 0);  // unlimited length of message output
    @ini_set('display_errors', 0);      // do not output errors to screen/browser/client
    @ini_set('error_log', $debug_logfile_path);  // the filename to log errors into
    @ini_set('error_reporting', $errors_to_log ); // log only errors according to defined rules
  }

 

转载于:https://www.cnblogs.com/awinlei/archive/2013/03/12/2956094.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值