peter
05-07-2002, 09:03 AM
Hey one and All,
I'm building a site with an online news feed. I'm also building a news editors where site certain people can edit the news online.
I'm using PHP To write to a txt file AND to encode to URl encoded txt to ensure the HTML entities and read back in correct.
this is to code;
<?php $fd = fopen("nieuws.txt", "w");
$HTMLText = rawurlencode($HTMLText);
fwrite($fd, "PlainText=$HTMLText");
fclose($fd); ?>
The problem is small but nasty, Every special caracters is encoded good except " and ' . When read back in its places a / ' .
Anyone got any idea (other php function to solve this, maybe)
Thanx
Peter:confused:
I'm building a site with an online news feed. I'm also building a news editors where site certain people can edit the news online.
I'm using PHP To write to a txt file AND to encode to URl encoded txt to ensure the HTML entities and read back in correct.
this is to code;
<?php $fd = fopen("nieuws.txt", "w");
$HTMLText = rawurlencode($HTMLText);
fwrite($fd, "PlainText=$HTMLText");
fclose($fd); ?>
The problem is small but nasty, Every special caracters is encoded good except " and ' . When read back in its places a / ' .
Anyone got any idea (other php function to solve this, maybe)
Thanx
Peter:confused: