stephenodotcom Posted August 20, 2006 Share Posted August 20, 2006 I am trying to write image tags that are stored in text that is being written to by a php script. The problem I have is when it writes to the file it includes a / between all the " or ' in the tag. For instance:<img src=\'images.jpg\' alt=\'Image\' />How can I solve this? I have done quite a lengthly search and have yet to find any resonable solution. For all those interested here is the code I have used to write to the TXT file. Extreamly simple and straightforward: if (is_writable($file1)) { /* OPEN THE FILE */ $handle1 = fopen($file1, "w"); /* WRITE TO THE FILE */ fwrite($handle1, $updatetext1); /* CLOSE THE FILE */ fclose($handle1); // MARK THE FILE AS WRITABLE $writable = 1; }I thank all those who try and help. It is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 20, 2006 Share Posted August 20, 2006 Use stripslashes (http://www.php.net/stripslashes) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.