Accessing a file with contents
I have made some pages where PHP produces a menu and gets the
contents from separate files. It works okay. But something I read
made me wonder if there smarter ways to access the content file.
At present I use include($content). Now I realize that this means
that the conten file is PHP-parsed. I use that in some cases so I
probably won't change it.
If however I only needed to get the text and send it directly to
the browser, is it true then that just I can use
<? readfile($contents); ?>
Can I trust that readfile() will send the contents to the browser
without a specific print() command?
I read a note about the new version of file_get_contents() not
being very fast (since it got binarysafe). Do others agree with
I did not see any particular difference in speed when I tried
readfile() instead of include(). Does it matter?
|All times are GMT. The time now is 12:43 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.