Uedit settings
Modifying the uploader class
Source code this comment
$url= "upimg.com/uploadimg.php"; $tmpName=$file[' Name '];//file name on upload $tmpFile=$file[' Tmp_name '];//temporary storage path on upload $tmpType=$file[' type '];//types of files uploaded $folder= ' Goods_uedit ';//Storage Path//perform upload $data= Json_decode ($this->upload_file ($url,$tmpName,$tmpFile,$tmpType,$folder)); if($data-code) { $this->filename =$data-name; $t= Time(); $d=Explode(‘-‘,Date("Y-y-m-d-h-i-s")); $format=$this->config["Pathformat"]; $format=Str_replace("{yyyy}",$d[0],$format); $format=Str_replace("{yy}",$d[1],$format); $format=Str_replace("{mm}",$d[2],$format); $format=Str_replace("{DD}",$d[3],$format); $format=Str_replace("{hh}",$d[4],$format); $format=Str_replace("{II}",$d[5],$format); $format=Str_replace("{SS}",$d[6],$format); $format=Str_replace("{Time}",$t,$format); $this->fullname =$format.$data-name; $this->stateinfo = ' SUCCESS '; }
functionUpload_file ($url,$filename,$path,$type,$folder){ //PHP 5.5 and above usage if(class_exists(' \curlfile ')) { $data=Array( ' IMGs ' =New\curlfile (Realpath($path),$type,$filename), ' folder ' =$folder ); } Else { $data=Array( ' IMGs ' = ' @ '.Realpath($path)."; Type= ".$type."; Filename= ".$filename, ' folder ' =$folder ); } $ch=Curl_init (); curl_setopt ($ch, Curlopt_url,$url); curl_setopt ($ch, Curlopt_post,true); curl_setopt ($ch, Curlopt_postfields,$data); curl_setopt ($ch, Curlopt_header,false); curl_setopt ($ch, Curlopt_returntransfer,true); $return _data= Curl_exec ($ch); $return _data=Trim($return _data); Curl_close ($ch); return $return _data; }
Uedit Rich Text editor image upload image server