|
|
@@ -7,15 +7,12 @@ |
|
|
|
* @link https://www.dedebiz.com |
|
|
|
*/ |
|
|
|
//生产环境使用production,如果采用dev模式,会有一些php的报错信息提示,便于开发调试 |
|
|
|
|
|
|
|
if (!defined('DEDE_ENVIRONMENT')) { |
|
|
|
define('DEDE_ENVIRONMENT', 'production'); |
|
|
|
} |
|
|
|
|
|
|
|
if (!defined('DEBUG_LEVEL')) { |
|
|
|
define('DEBUG_LEVEL', FALSE);//如果设置为TRUE则会打印执行SQL的时间和标签加载时间方便调试 |
|
|
|
} |
|
|
|
|
|
|
|
if (DEDE_ENVIRONMENT == 'production') { |
|
|
|
ini_set('display_errors', 0); |
|
|
|
if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
|
@@ -30,7 +27,6 @@ if (DEDE_ENVIRONMENT == 'production') { |
|
|
|
error_reporting(-1); |
|
|
|
ini_set('display_errors', 1); |
|
|
|
} |
|
|
|
|
|
|
|
define('DEDEINC', str_replace("\\", '/', dirname(__FILE__))); |
|
|
|
define('DEDEROOT', str_replace("\\", '/', substr(DEDEINC, 0, -6))); // 站点根目录 |
|
|
|
define('DEDEDATA', substr(DEDEINC, 0, -6).'data'); |
|
|
@@ -88,7 +84,6 @@ function _RunMagicQuotes(&$svar) |
|
|
|
} |
|
|
|
return $svar; |
|
|
|
} |
|
|
|
|
|
|
|
foreach (array('_GET', '_POST', '_COOKIE') as $_req) { |
|
|
|
foreach ($$_req as $_k => $_v) { |
|
|
|
if ($_k == 'nvarname') ${$_k} = $_v; |
|
|
@@ -229,7 +224,6 @@ if (isset($GLOBALS['PageNo'])) { |
|
|
|
if (isset($GLOBALS['TotalResult'])) { |
|
|
|
$GLOBALS['TotalResult'] = intval($GLOBALS['TotalResult']); |
|
|
|
} |
|
|
|
|
|
|
|
if (!isset($cfg_NotPrintHead)) { |
|
|
|
if (PHP_SAPI != 'cli') { |
|
|
|
header("Content-Type: text/html; charset={$cfg_soft_lang}"); |
|
|
|