|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
storing ms documents in mysql & php problem
i'm having a problem viewing ms documents i store in a mysql db. i'm splitting the blobs into 64k chunks so one document may take up 50 rows. i don't know if the problem lies in my php code.
here's what i'm doing to split the file PHP Code:
image files seem to work fine when i retrieve them, pdfs lose their fonts sometimes, but all microsoft documents have errors. any clue? |
|
#2
|
|||
|
|||
|
here's how i'm displaying the document:
PHP Code:
|
|
#3
|
||||
|
||||
|
I'd guess your trim could cause problems and that you need also to add stripslashes(), since you're adding them when you insert the data. Why are you bothering splitting the files? Just stick 'em in a blob.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#4
|
|||
|
|||
|
Quote:
i tried not slicing the file but files over 1mb seemed to not insert. they are insterting into blobs. |
|
#5
|
||||
|
||||
|
Another option is to store the files on the file system and keep a reference to them in the database. Did you have any luck removing trim() and adding stripslashes()?
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > storing ms documents in mysql & php problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|