RE: include vs. fread
| From: | Nold, Mark | Date: | Wed, 11 Oct 2000 05:25:48 +0000 |
| Subject: | RE: include vs. fread | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19507@lists.php.net to get a copy of this message | ||
----------------------------------------------------------------------------
-----------------
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
postmaster@normandy.com.au and delete the email document without making a
copy.
----------------------------------------------------------------------------
-----------------
include will execute any php commands in the file while fread wont.
If you allow users to define the file you are trying to use dont use
include().
-----Original Message-----
From: Geoffrey Makstutis [mailto:gm@51pct.com]
Sent: Wednesday, October 11, 2000 3:30 AM
To: php-general@lists.php.net
Subject: include vs. fread
Is there a better way to include the contents of file for inclusion within
another file? For example, with templates is it better to create files that
are of the form:
echo ".... a whole bunch of stuff here...";
and then call an include() within your script.
Or, is it better to do an fread() to include the contents of the file?
Thanks