how to include php file in a tpl file.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tmd_raju
Forum Newbie
Posts: 1
Joined: Tue Jun 20, 2006 12:56 am

how to include php file in a tpl file.

Post by tmd_raju »

im using fasttemplates, i want to include an php file in an tpl file. i tried using the following code like

1.<td>{php}include('../show.php');{/php}</td>

2.<td>{include_php file="../shoe.php'}</td>

both r not working, the php code is displayed as it is,help me how to include the php file.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Code: Select all

<td><?php include 'folder/filename.tpl'; ?></td>
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Does FastTemplates allow executable PHP code? Do they have a manual that you can reference?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

astions wrote:

Code: Select all

<td><?php include 'folder/filename.tpl'; ?></td>
Read the question before answering
Robert Plank
Forum Contributor
Posts: 110
Joined: Sun Dec 26, 2004 9:04 pm
Contact:

Post by Robert Plank »

Everah wrote:Does FastTemplates allow executable PHP code? Do they have a manual that you can reference?
No, they don't.

The point of FastTemplate is no PHP or logic in the templates at all.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

And there you have it, the answer to the OP's question.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Pimptastic wrote:
astions wrote:

Code: Select all

<td><?php include 'folder/filename.tpl'; ?></td>
Read the question before answering
I did, I didn't realize that fasttemplates was an application.
Post Reply