How do I get PHP Errors to display?
1 2 3 4 5 6 7 |
<?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); ?> |
1 2 3 4 5 6 7 |
<?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); ?> |
1 2 3 4 5 6 7 8 9 10 11 |
$dom = new DOMDocument('1.0', 'utf-8'); $element = $dom->createElement('test', 'This is the root element!'); // We insert the new element as root (child of the document) $dom->appendChild($element); header("Content-type: text/xml"); echo $dom->saveXML(); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?php function errorHandler($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_NOTICE: case E_USER_NOTICE: case E_DEPRECATED: case E_USER_DEPRECATED: case E_STRICT: //echo("STRICT error $errstr at $errfile:$errline \n"); break; case E_WARNING: case E_USER_WARNING: echo("WARNING error $errstr at $errfile:$errline \n"); break; case E_ERROR: case E_USER_ERROR: case E_RECOVERABLE_ERROR: exit("FATAL error $errstr at $errfile:$errline \n"); default: exit("Unknown error at $errfile:$errline \n"); } } set_error_handler("errorHandler"); php?> |
다음과 같은 작업이 편해짐 //sFileName = sFileName.Replace(” “, “”).Trim(); //sFileName = sFileName.Replace(@”\”, “”).Trim(); //sFileName = sFileName.Replace(“/”, “”).Trim(); //sFileName = sFileName.Replace(“:”, “”).Trim(); //sFileName = sFileName.Replace(“?”, “”).Trim(); ////sFileName = sFileName.Replace(“””, “”).Trim(); //sFileName = sFileName.Replace(““, “”).Trim(); //sFileName = sFileName.Replace(“|”, “”).Trim(); 결과