class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
then for debugging .... correct file: GetInfoHandler.php
$id = $_POST['sessionId'];
$id = trim($id);
session_name($id);
session_start();
echo $_SESSION['value'];
/****** for debbuger `class.upload.php` uncomment this line *******/
//echo $_SESSION['error'];
if($_SESSION['value']==-1) {
session_destroy();
}
..and at last for output debugger find this line in file dhtmlXVault.js:
tblContent.rows[1].cells[0].innerHTML += "Done";
and add these lines bellow:
/****** for debugger `class.upload.php` uncomment this two lines *******/
//result = xmlHttp.responseText;
//tblContent.rows[1].cells[0].innerHTML += result;
this is UploadHandler.php ......
include('class.upload.php'); $id = $_GET['sessionId']; $id = trim($id); session_name($id); session_start(); $inputName = $_GET['userfile']; $tempLoc = $_FILES[$inputName]['tmp_name']; echo $_FILES[$inputName]['error']; $handle = new upload($_FILES[$inputName]); if ($handle->uploaded) { /*********Optional for image manipulation********* $handle->file_new_name_body = 'image_resized'; $handle->image_resize = true; $handle->image_x = 100; $handle->image_ratio_y = true; */ $handle->process('../../uploadDir'); if ($handle->processed) { $_SESSION['value'] = -1; /****** for debugger `class.upload.php` uncomment this line *******/ //$_SESSION['error'] = $handle->log; $handle->clean(); } else { echo 'error : ' . $handle->error; } }then for debugging .... correct file: GetInfoHandler.php
$id = $_POST['sessionId']; $id = trim($id); session_name($id); session_start(); echo $_SESSION['value']; /****** for debbuger `class.upload.php` uncomment this line *******/ //echo $_SESSION['error']; if($_SESSION['value']==-1) { session_destroy(); }..and at last for output debugger find this line in file dhtmlXVault.js:
and add these lines bellow:
enjoy! :)