Echoing an HTML document
Posted: Wed Aug 08, 2007 10:52 pm
This seems like a simple thing, so simple that I couldn't find anything through google or w3c.
I am fairly new to PHP but I used what I know and it worked except for a strange problem, at the end of the echoed file it put the number 1, I have no clue why its doing this. I checked the HTML document and it didn't have the number one at the end so its the PHP doing it.
My code,
At first I tried echoing "links.html" and it worked except it spit out the word "links.html" at the end, now it seems to want to spit out 1.
Is there a better way of doing this?
I am fairly new to PHP but I used what I know and it worked except for a strange problem, at the end of the echoed file it put the number 1, I have no clue why its doing this. I checked the HTML document and it didn't have the number one at the end so its the PHP doing it.
My code,
Code: Select all
<?php
$links = require_once('links.html');
echo "$links"
?>Is there a better way of doing this?