Jump to content

Archived

This topic is now archived and is closed to further replies.

stephenodotcom

Writing image tags via PHP.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.