My template includes {php}require_once('includes/db_config.inc.php'); {/php}
but the html produced has the contents of the db_config.inc.php file displayed. It doesn't interpret the PHP.
Any help will be appreciated.
Thanks,
Dave
I get the following at the beginning of the web page:
<?
//Troubleshooting:
//echo "This is the config file";
//---------------------------------------------
//---------------------------------------------
//Set the variables below for each site:
//Choose the includes directory for the CMS
$includesPath = "/home/kris/includes/";
//Choose a default language by commenting and uncommenting:
$defaultLang = "eng";
//$defaultLang = "jap";
//Setup the database connection
Smarty seems to expand tags in header **'use_smarty_php_tags is enabled **
-
- New Member
- Posts: 6
- Joined: Thu May 08, 2008 5:07 pm
Smarty seems to expand tags in header **'use_smarty_php_tags is enabled **
Last edited by DavidOlsen192 on Sat May 10, 2008 2:00 am, edited 1 time in total.
Re: Smarty seems to expand tags in header but php is not executed
A quote from the developers documentation:
To enable this functionality, you need to change one line of the config.php file in your installation. Change the "use_smarty_php_tags" setting to true. i.e.:
#Allow smarty {php} tags? These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = true;
-
- New Member
- Posts: 6
- Joined: Thu May 08, 2008 5:07 pm
Re: Smarty seems to expand tags in header but php is not executed
Sorry, I thought I mentioned that (it was late). Smarty tags are turned on in config.php. I am using php 5.1.6 on a CentOS 4.6 server. I don't have root.
Is there a simple way to test that Smarty is actually working?
If I have the flag enabled but am still having this problem is it a fairly sure thing that I have Smarty misconfigured?
I am moving a website from one server to another and have never used Smarty or CMS so I am dealing with a learning curve.
Thanks,
Dave
Is there a simple way to test that Smarty is actually working?
If I have the flag enabled but am still having this problem is it a fairly sure thing that I have Smarty misconfigured?
I am moving a website from one server to another and have never used Smarty or CMS so I am dealing with a learning curve.
Thanks,
Dave