Re: Problem with include_path or file path
| From: | Monte Ohrt | Date: | Tue, 11 Dec 2001 21:59:17 +0000 |
| Subject: | Re: Problem with include_path or file path | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2257@lists.php.net to get a copy of this message | ||
If you are executing Smarty from index.php, then that is correct
"./configs" is not in that directory. Supply an absolute path, or a path
relative to your include_path should work.
$smarty->config_dir = "./include/configs"; // path relative to index.php
$smarty->config_dir = "/mysite.com/include/configs"; // absolute path
$smarty->config_dir = "configs"; // picks up from include_path
Androse Rosewood wrote:
>
> Hello,
>
> I'm having some trouble with the include path. This is my set up :
>
> mysite.com/index.php
> mysite.com/include/Smarty.class.php
> mysite.com/include/Config_File.class.php
> mysite.com/include/Smarty.addons.php
> mysite.com/include/Smarty_Compiler.class.php
> mysite.com/include/config.inc.php
> mysite.com/include/misc/
> mysite.com/include/cache/
> mysite.com/include/configs/
> mysite.com/include/templates/my_template.tpl
> mysite.com/include/templates_c/
> mysite.com/include/overlib.js
> mysite.com/include/PEAR.php
>
> If i look at phpinfo() in my index.php, I see that the local include
> path points here :
> mysite.com/include/:.
>
> I did not change the include path in Smarty.class.php.
>
> And this is the error message i get :
> -----------
> Config_File: Bad config file path './configs'
> Warning: Smarty error: unable to read template resource:
> "my_template.tpl" in Smarty.class.php on line 1081
> Warning: Smarty error: unable to read template resource:
> "file:debug.tpl" in Smarty.class.php on line 1081
> ----------
>
> If i put the index.php in the include/ directory, then everything is
> fine. But that is not what i want ;).
>
> I'm using Smarty 1.4.4 (because of mkdir() restriction).
>
> Any ideas ?
>
> Thanks alot.
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/