Re: [SMARTY] template file type html?
| From: | Nagger | Date: | Fri, 18 Jul 2003 17:35:56 +0000 |
| Subject: | Re: [SMARTY] template file type html? | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9928@lists.php.net to get a copy of this message | ||
> > why don't you just call the files foo.html instead of foo.tpl?
>
> Sorry I'didn't try it, because i couldn't found something about in the
> documentation.
> Thanks, now I know, that it will work.
Just a small tip:
If your template files are within the document-root (they shouldn't, but very often they are)
name them *.php
and add a first line similar to this:
{* nothing *<?php echo '}';exit; ?> *}
It's just a smarty comment, but if one will access this file direct, PHP will only display
"{* nothing *}" and then stop the
execution.
So nobody can read your source template file from outside.
In most editors syntax highlighting of *.php files also highlights html-tags.
bye...
Nagger
PS: Of cause you can also restrict the access via .htaccess