This is a discussion on PHP Storing compressed data in mssql image field within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hello all, I am trying to store a large string representing a RTF document through PHP in a MS SQL ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello all,
I am trying to store a large string representing a RTF document through PHP in a MS SQL Server database. To gain diskspace i want to compress that string. My code looks like this: str_replace("'","''",addslashes(gzcompress($RTF1)) ) The insert succeeds but the problem occurs when i try to retrieve the data form the database and when i try to transform it to the original string, i then use: $RTFdecompressed = gzuncompress(stripslashes(str_replace("''","'",$RT F))); But this does not work ok.... Can someone have any suggestions please? Marcel |
|
|||
|
"Marcel" a écrit le 11/12/2003 :
> Hello all, > > I am trying to store a large string representing a RTF document through PHP [...] Please do not multipost ! The answer I made you on alt.php.sql : You must use the functions the other order! First uncompress then stripslashes, then replace : $RTFdecompressed = str_replace("''","'",stripslashes(gzuncompress($RT F))); -- Have you read the manual ? http://www.php.net/manual/en/ |