Created
August 2, 2012 07:42
-
-
Save allen501pc/3234928 to your computer and use it in GitHub Desktop.
Initialization of settings for PHP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Author: Allen ([email protected]) | |
Brief: Initialization of settings for PHP. | |
Date: August 2, 2012. | |
*/ | |
/* 開啟Debug模式 */ | |
define("IS_DEBUG_MODE",1); | |
if(IS_DEBUG_MODE) | |
{ | |
/* 初始化環境設定 */ | |
/* 注意!E_ALL在PHP 6以下的版本,並不包含E_STRICT。但是在PHP6以上的版本,卻包含E_STRICT */ | |
ini_set('error_reporting', E_ALL | E_STRICT); | |
/* display_errors 預設為 On,當執行php網頁發生錯誤時,會將錯誤、警告訊息顯示在網頁上 */ | |
ini_set('display_errors', 1); | |
/* 如果display_startup_errors設定為Off,縱使display_errors設定為On,也不會顯示在網頁上。 */ | |
ini_set('display_startup_errors', 1); | |
} | |
else | |
{ | |
/* 關閉Error輸出記錄 */ | |
ini_set('display_startup_errors',0); | |
ini_set('display_errors',0); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment