php - how to set encoding after using move_uploaded_file? -
i saving file using move_uploaded_file($file['tmp_name'], $save_path . $filename); when file name choose in arabic , file saved in strange characters : ÒíäÈ.pdf.
so when try open uploaded file later, says file not found .(the real one) should ??
it better rename image name using time stamp
$imgname = time().'.'.'jpg'; $imgtmpname=$_files['file']['tmp_name']; $fullpath= $path.$imgname; $filename = $imgname; move_uploaded_file($imgtmpname,$fullpath); and store $imgname in database can fetch image name..it avoid name conflict between images timestamps keep changing.
Comments
Post a Comment