1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- error_reporting(E_ALL);
- ob_start("ob_gzhandler");
- require_once ("config.php");
- if(!extension_loaded("soap"))
- die("Soap extension not loaded!");
- session_start();
- /** autoload functie voor PHP5 */
- function __autoload($classname) {
- $path = dirname(__file__);
- if(file_exists("$path/lib/data_objects/$classname.class.php")){
- include("$path/lib/data_objects/$classname.class.php");
- }elseif(file_exists("$path/lib/soap/$classname.class.php")){
- include("$path/lib/soap/$classname.class.php");
- }elseif(file_exists("$path/lib/$classname.class.php")){
- include("$path/lib/$classname.class.php");
- }
- }
- /** Schrijft de gegeven tekst naar de debug file */
- function debug($txt,$file="debug.txt"){
- $fp = fopen($file, "a");
- fwrite($fp, str_replace("\n","\r\n","\r\n".$txt));
- fclose($fp);
- }
- /** Schrijft het gegeven object weg in de debug log */
- function debugObject($txt,$obj){
- ob_start();
- print_r($obj);
- $data = ob_get_contents();
- ob_end_clean();
- debug($txt."\n".$data);
- }
|