Hello, Can someone help me with the php codes to insert in Smarty TPL file <?php ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../. ./../'); include ('ad_network_254.php'); echo $ad_network; echo $2t; ?> My site uses Smarty and I donot know how to include the php codes
HI everybody how can I realize if the php file is included in the smarty template file? I included a php file into my smarty template like this: {php} include('./path/to/whatever.php'); {/php} and I really don't know if it's included or not? sorry i don't know any thing about PHP at all? I'm a web designer.
Smarty is a great tool for both designers and developers. By using Smarty you can reduce the site development and maintenance times. If you are a developer you no longer need to mix PHP code with HTML code. Just take care of business logic and leave the HTML to the designer.
there are two options one is {php} the code u want to place {/php] and the other method may be use the php include function.
I am So so so Sorry . But You Are So Stupid . He Said Non Of The Codes That U Gave had Worked . This Is A Big Problem For Me . I Need To echo mysql Field Content To a Form In TPL Format . And Non Of These Works : {php} Your COde {/php} {include_php file="/path/to/somefile.php"} What Is Closing Tags . Are U Just ... . Is He That Stupid To Forgot To Close Tag ???? I Put This Code In a TPL File But The File's contents DId Not Appear When I Opened It :| <?php include('Templates/db/config.php); $sql = "select * from `p_players` where ID = 1";$query = mysql_query($sql); while ($row = mysql_fetch_array($query)){ $id = $row['ID']; $fname = $row['name']; $lname = $row['email']; $phone = $row['gold_num']; //we will echo these into the proper fields } ?> PHP: What To Do ??