Jump to content

Writing image tags via PHP.


stephenodotcom

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.