أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
<p>how to upload and download arabic file with arabic file name using php and mysql?</p>
There is now problem with that , could you explain where is your problem ?
To upload files :
http://www.w3schools.com/php/php_file_upload.asp
You can save those data to DB , and insure are in Arabic please use UTF-F encoding
Generate a unique filename with date and time for each uploaded file
Rename the uploaded file with the newly generated name.
Save the original filename and extension in another column in the same table row within the database.
Then for downloading/fetching you can easily retrieve the original filename with extension from the table and display it to the user.
Thus if two files are uploaded with the same name, you dont need to create name1, name2 etc and it wont overwrite the original.
If you need to store the filenames in MySQL, make sure you are having proper table and column collations, like utf8_unicode_ci.
execute these sql when u initial ur connection:
$this->execute("SET character_set_client=utf8");
("SET character_set_connection=utf8");
("SET character_set_database=utf8");
("SET character_set_results=utf8");
("SET character_set_server=utf8");
Before Executing SQL Query use this mysql_query("SET character_set_client=utf8")
Following question debate may help you: