Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Use PHP File in assign from Template?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
Albert Wesker
Smarty Rookie


Joined: 03 Jun 2003
Posts: 6

PostPosted: Tue Jun 10, 2003 12:02 pm    Post subject: Use PHP File in assign from Template? Reply with quote

Me again..

$smarty->assign('Content',"editcontent.php");

As you can see i try to include an PHP File. That i try from my index.php which displays at the end a Template (*.tpl) file. It works as far as some HTML code in there is displayed - the PHP part is treated as plain Text.

I guess im missing something?

Help?
Back to top
View user's profile Send private message
Albert Wesker
Smarty Rookie


Joined: 03 Jun 2003
Posts: 6

PostPosted: Tue Jun 10, 2003 12:27 pm    Post subject: I found the source but not the solution... Reply with quote

<?
require_once("classes\db_class.php");
$db = new db_class;
$db->connect();


Smarty stops parsing or working with the php code where the "->" appear.

Is there a workaround for that?

help?
Back to top
View user's profile Send private message
Albert Wesker
Smarty Rookie


Joined: 03 Jun 2003
Posts: 6

PostPosted: Tue Jun 10, 2003 12:44 pm    Post subject: OK... Reply with quote

{php}


echo "Hey - RTFM is an excellent suggestion."


{/php}
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Tue Jun 10, 2003 10:35 pm    Post subject: Reply with quote

Well, at least you ate your own dogfood Smile Glad to see you found it.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP