Re: [SMARTY] Smarty unable to read template resource?
| From: | Monte Ohrt | Date: | Mon, 13 Jan 2003 20:58:54 +0000 |
| Subject: | Re: [SMARTY] Smarty unable to read template resource? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7145@lists.php.net to get a copy of this message | ||
Smarty will not look for the templates and templates_c directories in
the same directory as your Smarty library files. By default it will look
in the CWD, the same directory as the executing script. If they are
somewhere else, you will need to change $template_dir and $compile_dir
settings. See the Smarty installation docs for examples of good methods
to set things up.
Monte
On Mon, 2003-01-13 at 13:23, 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");
--
Monte Ohrt <monte@ispi.net>