faqts : Computers : Programming : Languages : PHP : Function Libraries

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

26 of 28 people (93%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

What's the fastest way to include a file directly into a page?
How can I include the raw content of a file into my HTML output?

Nov 24th, 2000 12:38
Dan Thies, Nathan Wallace, Rasmus Lerdorf


ReadFile() will be faster since it doesn't have to check for PHP tags
like include/require.

    http://www.php.net/manual/function.readfile.php3

==
Example:
<?php @readfile("myfile.txt"); ?>
this will cause the file to be read directly to the browser.