Skip to content Skip to sidebar Skip to footer

Does Sometime Fputs() Or Fwrite() Encode Html Special Characters?

I am outputting a string that consists of html content to a html file, but in the html file the html special characters are encoded (for example ' in \" ). I've even used

Solution 1:

You are probably suffering from Magic Quotes

Check you phpinfo();

To clear Magic Quotes look into the discussion at php.net: http://www.php.net/manual/en/function.stripslashes.php

Example (c) jeremysawesome:

array_walk_recursive($_POST, create_function('&$val', '$val= stripslashes($val);'));

Post a Comment for "Does Sometime Fputs() Or Fwrite() Encode Html Special Characters?"