graham23s Posted May 25, 2007 Share Posted May 25, 2007 Hi Guys, when using the get_file_contents function i allow users to upload doc and txt files, but i have noticed when PHP hits unusual character in the doc or txt files it, doesn't upload properly, is there a way i could strip all the extra characters and just have text from the file? $filename = $files; $content = file_get_contents("uploaded_files/$filename"); $files_for_mysql = mysql_real_escape_string($content); thank guys Graham Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted May 26, 2007 Share Posted May 26, 2007 ??? why do you need that just to allow users to upload a file? if you are storing the file in a database then you store in a blob field - there are plenty of examples such as this http://www.phpbuilder.com/columns/florian19991014.php3 to do just that. otherwise just upload the file to a directory. Quote Link to comment Share on other sites More sharing options...
graham23s Posted May 26, 2007 Author Share Posted May 26, 2007 Hi Mate, solved thank mate Graham Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.