Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: Include problem

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Thanked 0 Times in 0 Posts

    Question Include problem

    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>
    Last edited by Richard; 12-28-2003 at 01:21 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts