|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
sourcecode71 Smarty n00b
Joined: 19 Sep 2003 Posts: 2
|
Posted: Fri Sep 19, 2003 1:01 pm Post subject: Warning message |
|
|
Hi,
It's my first time to use smarty, I though I did setup everything correctly. I'm using windows 2000 IIS. path to my template folder seems ok. here is my code:
define('SMARTY_DIR',"C:/LoanFind_PHPver2/WorkingFolder/website/Real/Smarty/");
require_once(SMARTY_DIR."Smarty.class.php");
class Smarty_loanfind extends Smarty{
function Smarty_loanfind(){
$this->template_dir = 'c:/LoanFindPHPver2/WorkingFolder/website/Real/Smarty/templates/';
$this->compile_dir = 'c:/LoanFindPHPver2/WorkingFolder/website/Real/Smarty/templates_c/';
$this->config_dir = 'c:/LoanFindPHPver2/WorkingFolder/website/Real/Smarty/configs/';
$this->cache_dir = 'c:/LoanFindPHPver2/WorkingFolder/website/Real/Smarty/cache/';
}
}
$smarty = new Smarty_loanfind();
// assign some content
$smarty->assign('name', 'george smith');
$smarty->assign('address', '45th & Harris');
// display it
$smarty->display('index.tpl');
then i get this:
Warning: Smarty error: unable to read template resource: "index.tpl" in C:\LoanFind_PHPver2\WorkingFolder\website\Real\Smarty\Smarty.class.php on line 553
in smarty.class.php
function trigger_error($error_msg, $error_type = E_USER_WARNING)
{
line 553-> trigger_error("Smarty error: $error_msg", $error_type);
}
I'm not really sure what's happening. Thanks for the help in advance.
sourcecode71 |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Sep 19, 2003 2:54 pm Post subject: |
|
|
is your index.tpl in c:\LoanFindPHPver2\WorkingFolder\website\Real\Smarty\templates\index.tpl ??? |
|
Back to top |
|
sourcecode71 Smarty n00b
Joined: 19 Sep 2003 Posts: 2
|
Posted: Fri Sep 19, 2003 9:37 pm Post subject: |
|
|
Hi messju,
Ok thanks for that!!! it's actually on this folder:
'c:/LoanFind_PHPver2/WorkingFolder/website/Real/Smarty/templates/'
not on this one:
c:/LoanFindPHPver2/WorkingFolder/website/Real/Smarty/templates/
the difference is: LoanFind_PHPver2 to: LoanFindPHPver2
it's working now!!!
by the way i'm using windows2000 IIS so folder path uses "/" slashes!!!
I have to shorten my paths so that errors like this would be easier to find next-time.
Thanks!!!
sourcecode71 |
|
Back to top |
|
|
|
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
|