RTF file upload in PHP and problems with UTF

Phil-91

New Member
I want to create a web form which will allow the user to upload text/rtf files in UTF-8 having foreign language content using PHP and then execute a series of commands on it via the exec() function. After this processing I would be giving it back to the user as a download.I made rudimentary form in html with a file input form and submit button. and the PHP side has the following contents.\[code\]$base_dir = './uploads';$cmd = "mkdir -p ".$base_dir.' ; mv -v '.$_FILES['file']['tmp_name'].'$_/'.$_FILES['file']['name'].' ; /var/www/cgi-bin/test.awk'.'/var/www/html/uploads/'.$_FILES['file']['name'].'>'.'/var/www/html/uploads/'.$_FILES['file']['name'];exec($cmd);print '<a href="http://oceanfizz.usc.edu/uploads/'.$_FILES['file']['name'].'">download file </a>';\[/code\]But the problem is that the uploaded rtf files seem to have text changes mainly like \[quote\] so "
 
Back
Top