View Full Version : Include problem

12-27-2003, 11:42 PM
This is my code:

<textarea rows="35" name="page" cols="110"><? include("http://domain.com/directory/file.txt"); ?></textarea>

This is so I can edit the contents of the file using the form on a webpage.

However, file.txt contains html codes for special characters. For example ' & amp; '.

When the contents of the file are displayed in the text area box, the special characters are replaced with & for example. When I view the source of the page, it has done the same in the html.

How do I stop this from happening ? I just want the contents to be displayed in the text area exactly as they are in the file.



<textarea rows="35" name="page" cols="110"><? $lines = file ('http://domain.com/dir/file.txt'); foreach ($lines as $line) { echo htmlspecialchars("$line"); } ?></textarea>