How to add php script into .tpl file

| 1 Comment | No TrackBacks

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.

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-0916.cgi/2396

1 Comment

thx for the tips

Leave a comment

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.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.31-en

Subscribe

Online Tools

Code Convertor