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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -