Reading binary files
Posted: Fri Jan 16, 2009 3:53 am
hi everyone,
i am trying to upload a file without having to use html input file object, by reading the file contents using fopen and fread. i do it by outputting the contents of the ordinary file into a hidden html input box, then submit the form using javascript. i do it this way for a purpose.
everything works fine in ordinary files like text file, excel, word, etc., except binary files (tar.gz files for example). how can i treat these binary files as just like other files?
i am trying to upload a file without having to use html input file object, by reading the file contents using fopen and fread. i do it by outputting the contents of the ordinary file into a hidden html input box, then submit the form using javascript. i do it this way for a purpose.
everything works fine in ordinary files like text file, excel, word, etc., except binary files (tar.gz files for example). how can i treat these binary files as just like other files?