How to add php script into .tpl file

| 1 Comment

tpl file are smarty template files.

Sometimes I need to add php script, or php code into tpl file. That means I have to add php code into the smarty templates.

If you add php code directly, there is error code.

The right way is to add script like following way.

{php} your php code here {/php}

That's all.



1 Comment

thx for the tips

Leave a comment

About Me

As a tech geek and life geek, I always like to share my experience to you, my readers.

David Yin

About this Entry

This page contains a single entry by David Yin published on July 8, 2009 5:09 PM.

Add a new Ads unit on blog was the previous entry in this blog.

Stay away from Google Money Scams is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

Subscribe

Ads