<?php 
session_start();
error_reporting(0);
	
date_default_timezone_set('Asia/Kolkata');	
 $sm_img=$_FILES['photo']['name'];
      $sm_file_tmp = $_FILES['photo']['tmp_name'];
	 
	    $final_dest='temp';
		$filename=date('ymdhmi').'_'.$sm_img;
			
	
	  if(is_dir( $final_dest)==FALSE){
		mkdir($final_dest,0777,TRUE);
	
	}
	if(move_uploaded_file($sm_file_tmp,$final_dest.'/'.$filename)){
		$_SESSION['sm_img']=$filename;
	}
	
	
	$json_data = array("op"=>$filename);


echo json_encode($json_data); 
	

?>