You are here: smarty class nonexistent .. having a bad day « PHP Programming Language « IT news, forums, messages
smarty class nonexistent .. having a bad day

Posted by Matt on 09/10/05 01:04

geez, i've done this a million times, you'd think i could get it right.
uploading to production server for a new site, and part of the head.inc
that starts everything up looks like this:


echo SMARTY_DIR."Smarty.class.php<br>";
require_once(SMARTY_DIR."Smarty.class.php");

if (substr(phpversion(),0,1) == "4") {
$smarty = new Smarty;
// echo "created smarty in php4<br>";
// $smarty->__construct();
}else{
$smarty = new Smarty();
}

$smarty->template_dir = SMARTY_DIR."templates/";
$smarty->compile_dir = SMARTY_DIR."templates_c/";
$smarty->config_dir = SMARTY_DIR."configs/";

-------------------------

It outputs
http://[SITE].com/1.0/smarty/Smarty.class.php
which exists, and contains the class definition.
but then it says;
Fatal error: Cannot instantiate non-existent class: smarty in
/home/.sites/38/site49/web/1.0/head.inc on line 14

line 14 is the one in the PHP 4 loop:
$smarty = new Smarty;
and I've tried
$smarty = new Smarty();
as well

somewher I saw that there is supposed to be a configs/ directory for
smarty, but I don't have one on my local machine and everything works
fine here.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация