<p><b>htmlencode()</b>
Encodes the current template loaded into HTML.</p>
<p><b>display()</b>
Writes the current template to the user's browser.</p>
<p><b>removetags()</b>
Removes all tags that haven't been replaced.</p>
<p><b>saveas(<i>path as html</i>)</b>
Saves the current template to the specified path. Use this method when you
want to save the changes made to the template.
NOTE: If a file of the same name exists at the specified path, ".bak" will be
added to the end of its name; thus "myfile.tpl" would become "myfile.tpl.bak".</p></div>
</div>
message.tpl
------------------------------------------------------------------------
<html>
<body>
<pre>
This is an example of how to use my template class.
Dynamic data for your template can come from anywhere.
It can come from a built-in ASP function: <!--date-->
It can come from a file:
<!--self-->
You can even use it as an online source editing tool for your ASP code:
<form><textarea cols="80" rows="30"><!--aspcode--></textarea></form>
<!--howtouse-->
NOTE: Templates can't have any ASP code in them. It'll only process HTML.
This is good practice, because it produces cleaner code and HTML.
</pre>
</body>
</html>
希望能对你有所帮助!
| 对此文章发表了评论 |
