encode($data) ); } } @ini_set('gd.jpeg_ignore_warning', 1); $ym = date('ym'); $data_dir = $_SERVER[DOCUMENT_ROOT] . "/uploaded/webedit/".$ym."/"; $data_url = "/uploaded/webedit/".$ym."/"; @mkdir($data_dir, 0777); @chmod($data_dir, 0777); $is_editor_upload = true; if( $is_editor_upload ) { @require('UploadHandler.php'); $options = array( 'upload_dir' => $data_dir, 'upload_url' => $data_url, // This option will disable creating thumbnail images and will not create that extra folder. // However, due to this, the images preview will not be displayed after upload 'image_versions' => array() ); $upload_handler = new UploadHandler($options); } else { echo json_encode(array('files'=>array('0'=>array('error'=>'정상적인 업로드가 아닙니다.')))); exit; }