Re: [SMARTY] template file type html?
| From: | Kai-Uwe Beyer | Date: | Fri, 18 Jul 2003 19:14:17 +0000 |
| Subject: | Re: [SMARTY] template file type html? | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9929@lists.php.net to get a copy of this message | ||
Nagger wrote:
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; ?> *}Nice Trick. :)
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.I'm still looking for a html plugin (syntax highliting) for eclipse. My PHP Plugin doesn't work with html files.
PS: Of cause you can also restrict the access via .htaccessMy templates are in a subfolder of the project module. bye and thank Kai