Yeah the missing $ was a typo in my post. You may have a point with the path though, I moved the two files I wanted to read into the templates directory and changed the read to this:
PHP Code:
$smarty->assign('specials1', $smarty->fetch('special-news-1.txt'));
It found them fine then .... it's only when I take them out of the folder and put them up higher in the directory (with the site's pages) it can't find them..
This is what I have in the overall.inc.php file (the default set up):
PHP Code:
/* no cache */
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
/* turning off NOTICES */
error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
/* full path to calculator dir */
$calcdir = realpath(dirname(__FILE__).'/../');
/* including components */
include($calcdir.'/includes/config.inc.php');
include($calcdir.'/includes/functions.inc.php');
include($calcdir.'/includes/smarty/Smarty.class.php');
/* initialising Smarty engine */
$smarty = new Smarty;
$smarty->template_dir = $calcdir.'/templates';
$smarty->compile_dir = $calcdir.'/includes/smarty/templates_c';
$smarty->assign('config', $config);
/* GZIP compression */
@ob_start("ob_gzhandler");
So are you saying to set up the full path to those two directories from the site's root folder?
Bookmarks