|
Posted by Dalibor on 02/06/06 20:26
On Fri, 3 Feb 2006 23:52:34 +0100, Dalibor wrote:
> I have following code for putting contenst of a file into a web page:
> <?php
> $filename = "../msd/news.txt";
> $handle = fopen ($filename, "r");
> $content = fread ($handle, filesize($filename));
> fclose($handle);
> echo ($content);
> ?>
> But in file news.txt I have formating that is not showing, but
> interpreting.
> For example, in that file there is:
> <a href="link.php">link</a>
> End result is hyperlink.
>
> Can you tell me what I did wrong?
I find solution:
<textarea>
<?php
$filename = "../msd/news.txt";
$handle = fopen ($filename, "r");
$content = fread ($handle, filesize($filename));
fclose($handle);
echo ($content);
?>
</textarea>
--
..:Dalibor:.
Navigation:
[Reply to this message]
|