View Single Post
Old 5th June 2008, 06:30 PM   #7 (permalink)
Alex.
Registered User
 
Join Date: Jun 2007
Location: UK
Posts: 109
Send a message via MSN to Alex.
Hey bigbrennan,
First off include() is the wrong function to be using here - it is intended for including and evaluating php code.
The proper function for doing what you're doing is file_get_contents(), which returns the contents of the specified contents as a string.

The link was being sent to the browser because it wasn't encapsulated in php tags.

The number 1 was being sent to the browser because by default include() returns true or false depending on whether the inclusion of the file was successful.
When you echo a boolean value, it is automatically converted to either 1 (true) or 0 (false).
Alex. is offline   Reply With Quote