techker Posted May 12, 2010 Share Posted May 12, 2010 hey guys i need to modify my body's cms and it uses tpl pages. i need to add php to a page.i know there is setting pre made in smarty for {php} but that does not work for me? and other way to add php to tpl pages? Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/ Share on other sites More sharing options...
trq Posted May 12, 2010 Share Posted May 12, 2010 and other way to add php to tpl pages? Configure your server to parse files with the tpl extension as php. Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/#findComment-1057050 Share on other sites More sharing options...
techker Posted May 12, 2010 Author Share Posted May 12, 2010 its a shared hosting?is this in the php ini? Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/#findComment-1057052 Share on other sites More sharing options...
trq Posted May 12, 2010 Share Posted May 12, 2010 its a shared hosting?is this in the php ini? Nope, has nothing to do with php. Is it an Apache server? If so you could put the following within a .htaccess file. AddType application/x-httpd-php .tpl Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/#findComment-1057054 Share on other sites More sharing options...
techker Posted May 12, 2010 Author Share Posted May 12, 2010 cool afther i can do <? or {php} Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/#findComment-1057056 Share on other sites More sharing options...
trq Posted May 12, 2010 Share Posted May 12, 2010 {php} is NOT part of php. You will need to use <?php ?> Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/#findComment-1057071 Share on other sites More sharing options...
paparts Posted May 27, 2010 Share Posted May 27, 2010 tpl files are template files using smarty template engine. A simple {php} php code here... {/php} is the tag needed for you to execute php codes in a tpl file so as tmpl files. If you need more info about using the tag, you can visit smarty.net Quote Link to comment https://forums.phpfreaks.com/topic/201484-php-on-tpl-pages/#findComment-1063878 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.