reading a file
| From: | Monte Ohrt | Date: | Thu, 01 Mar 2001 17:34:41 +0000 |
| Subject: | reading a file | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-257@lists.php.net to get a copy of this message | ||
I'm adding a function for displaying the contents of a file. Any
suggestions on what to name the function?
{showfile file="navbar.js"}
{readfile file="navbar.js"}
{read file="navbar.js"}
{displayfile file="navbar.js"}
showfile has the vote at the moment.
Also for security reasons, I thought I'd restrict it to files only
within the document root, so if third parties are editing the templates,
they can't do something like {showfile file="/etc/passwd"} Any
objections?
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/