Fix the Error.Handling.inc method
This commit is contained in:
@@ -11,7 +11,8 @@ if ($DEBUG_ALL) {
|
|||||||
|
|
||||||
// sample config
|
// sample config
|
||||||
require("config.inc");
|
require("config.inc");
|
||||||
require(LIBS."Error.Handling.inc");
|
echo "FILE: ".BASE.LIB."Error.Handling.inc<br>";
|
||||||
|
require(BASE.LIB."Error.Handling.inc");
|
||||||
|
|
||||||
if ($var) {
|
if ($var) {
|
||||||
echo "OUT<br>";
|
echo "OUT<br>";
|
||||||
|
|||||||
@@ -8,7 +8,13 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
// define the base working directory outside because in the function it might return undefined
|
// define the base working directory outside because in the function it might return undefined
|
||||||
DEFINE('CURRENT_WORKING_DIR', getcwd().'/');
|
// if we have config set BASE use this
|
||||||
|
if (defined('BASE')) {
|
||||||
|
DEFINE('CURRENT_WORKING_DIR', BASE);
|
||||||
|
} else {
|
||||||
|
// else we set. We fully assuem that Error.Handling is where it should be, in lib dir
|
||||||
|
DEFINE('CURRENT_WORKING_DIR', str_replace('lib', '', __DIR__));
|
||||||
|
}
|
||||||
|
|
||||||
// METHOD: MyErrorHandler
|
// METHOD: MyErrorHandler
|
||||||
// PARAMS: $type: the error code from PHP
|
// PARAMS: $type: the error code from PHP
|
||||||
|
|||||||
Reference in New Issue
Block a user