Jump to content

Recommended Posts

Hi guys,

 

I am having a problem with either uploading or viewing a Word (.doc and .txt) file.

 

I use a form with multipart/form-data enctype to upload the file. I also parse the filesize, filetype and filecontent to a database. All is added to the database fine. After reading a few things on the internet it seemed I should use blob rather than text for the field type holding the content of the uploaded file.

 

However, when I view the contents, I get lots of extra characters at the top and bottom of the 'real' content. I have played around with charsets but to be honest, don't really know what I'm doing - and I haven't been able to make it any better!

 

There is no way we can change the Word file to HTML or import it into Dreamweaver as our clients will be uploading their own files - so we need to be able to strip these characters out via the website.

 

I hope that is explained OK but if anything is not clear, I will try and explain a bit further!

 

Here's hoping someone can help!  :)

Link to comment
https://forums.phpfreaks.com/topic/74738-php-uploads-and-word-files/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.