AW: [SMARTY] Smarty unable to read template resource?

From: Date: Tue, 14 Jan 2003 17:36:53 +0000
Subject: AW: [SMARTY] Smarty unable to read template resource?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7178@lists.php.net to get a copy of this message
I'm running a website on PHP 4.0.4pl1 with Smarty 2.3.1 without any problem. For the directories: including PHP files from a subdirectory doesn't change the current working directory. So relative pathnames have to be relative to the location of your main php file. Werner Schweizer > -----Ursprüngliche Nachricht----- > Von: Brian Fidler [mailto:interactive@brianfidler.com] > Gesendet: Montag, 13. Januar 2003 22:24 > An: smarty-general@lists.php.net > Cc: gearond@cvc.net > Betreff: Re: [SMARTY] Smarty unable to read template resource? > > > My PHP is fine. I can make Smarty work but I can't reference it from > files that are in subdirectories. So for instance if I have a > subdirectory "admin" where I want to maintain all of my PHP scripts I > can't use Smarty. Instead it appears I need to maintain all of my PHP > scripts on the same directory level as Smarty which I'm not > crazy about > but it works. > > Brian > > > On Monday, January 13, 2003, at 02:06 PM, Dennis Gearon wrote: > > > Have you checked your version of PHP? I've been told that > it needs to > > above a certain, recent > > level to work. My provider doesn't have that yet, so I'm > not bothering > > with Smarty until I change > > servers at his farm, (near future). > > > > 1/13/2003 12:49:54 PM, Roger <webmaster@g-i-w-s.com> wrote: > > > >> I've been on this email list for two months. Since day > one I've had > >> the > >> exact same error as yourself. The ony information I've > received is > >> that > >> obviously smarty is not finding the index.tpl file. I've > tried every > >> set up in the world and still can not get Smarty to go beyond that > >> error. Other then that, I haven't found a solution. I > remain on the > >> list to accumulate knowledge for if/when the day comes I can get > >> smarty > >> to work. > >> > >> Good Luck, > >> Roger > >> > >> Brian Fidler wrote: > >> > >>> I'm getting the following error: > >>> Smarty error: unable to read template resource: "index.tpl" in > >>> /var/www/mydomain/httpdocs/smartyfiles/Smarty.class.php > on line 589 > >>> > >>> I can get Smarty to work when all of my scripts reside in the top > >>> level directory that includes my template and template_c > directories. > >>> However I am trying to create a subdirectory (i.e. an "admin" > >>> directory). I am then trying to refer back to my Smarty > directories > >>> but it doesn't seem to like what I am doing. For instance > I am using > >>> the following statement in a file titled index.tpl that > resides in my > >>> admin directory which is on the same level as my smartyfiles > >>> directory > >>> and templates and templates_c directories... > >>> require("../smartyfiles/Smarty.class.php");the directory that > >>> Smarty.class.php resides in and am getting the error listed above. > >>> > >>> Any ideas? > >>> > >>> I've seen postings that had a similar error however I > haven't seen a > >>> response that I understand. for instance one solution was to... > >>> > >>> Add the following line to your constructor: > >>> parent::Smarty(); > >>> > >>> What exactly does that mean to a novice like myself? Can anybody > >>> point > >>> me in the right direction thanks? > >>> > >>> Thanks, > >>> brian fidler > >>> > >> > >> > >> > >> -- > >> Smarty General Mailing List (http://smarty.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.smarty.general (#7178) next »