strlen($prefix))? substr($URI,strlen($prefix)):'/'; $method = strtoupper($_SERVER['REQUEST_METHOD']); // PHP messages destroy XML output, so switch them off ini_set('display_errors', E_USER_NOTICE); //**************** // BASIC LOG HEADER //**************** $log = '---'; $req_hdrs = apache_request_headers(); unset($req_hdrs['Accept-Language']); // suppress junk $lt = localtime(time(),true); $ts = $lt['tm_hour'].':'.$lt['tm_min'].':'.$lt['tm_sec']; $log .= ' '.date('m/d/Y',time()).'['.$ts."] ".$_SERVER['REMOTE_ADDR'].'=>'.$method.' '.$path; error_log($log); $log = ''; foreach ($req_hdrs as $k=>$v) { $log .= $k.'='.$v.'--'; } error_log($log); //************** // INVOKE SERVER //************** $depot = new Depot_Filesystem; // instanciate server class $depot->prefix = $prefix; $depot->base = $base; $depot->path = $path; $depot->depot_host = $depot_host; $depot->depot_port = $depot_port; $depot->depot_agent = $depot_agent; $depot->admin_user = $admin_user; // used for deleting faux directory placeholders $depot->admin_passwd = $admin_passwd; $depot->ServeRequest($method); // process request flush(); // release any buffered output to client //***************** // BASIC LOG TRAILER //***************** //error_log(join('--',headers_list())); // PHP5 only error_log('--------'); ?>