Forum Moderators: coopster

Message Too Old, No Replies

problem when displaying ' from an ammended file

it displays \' when i include the dat file i have written to

         

yt404

10:39 pm on May 8, 2004 (gmt 0)

10+ Year Member



i have a problem i am using fwrite() to ammend a file and when i use include to display the file it shows all ' with a \ before it. like so

it\'s i\'m etc etc

anyone know what the prob is?

ergophobe

10:55 pm on May 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You have "magic_quotes_gpc on" and when you amend the file and post, it adds slashes. You need to use

stripslashes()

before outputting the results.

Tom

yt404

10:14 am on May 9, 2004 (gmt 0)

10+ Year Member



i have this so would it be like...

fwrite($a, <font face=verdana size=2><b>$name</b> : stripslahes($message);</font>
<hr noshade size=1 color=000000>);

?

yt404

12:57 pm on May 9, 2004 (gmt 0)

10+ Year Member



i got it sorted

i put the following code at the top of the code

$message = stripslashes($message);

works a treat and has solved my prob, thanks very much m8