Entry
When i do this why do i get the file content + 1 retuned : echo include("content/news.txt")? Fix?
May 17th, 2008 22:58
dman, Alina jane, Articles Hosting, Matthew Walker, Martyn PIttuck, http://www.ttnr.org
This is happening because you are misunderstanding how include() works.
You do not need to echo it. How include works is as follows:
You call include("content/news.txt");
PHP makes sure the file exists.
If it does, it turns off PHP parsing mode, and starts reading the file.
Unless it encounters a new PHP script tag, it will just pass the
contents of the file on to the webserver to send to the browser.
The '1' you are getting is the return code of include(), saying that it
succeeded in including the file.
=========
http://www.php.net/include
i hope that helps: