Re: [SMARTY] discovering the full path on shared unix host
| From: | Scott Barron | Date: | Tue, 28 Jan 2003 18:33:00 +0000 |
| Subject: | Re: [SMARTY] discovering the full path on shared unix host | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7376@lists.php.net to get a copy of this message | ||
On Tue, Jan 28, 2003 at 10:58:50AM -0700, Hoffman, Geoffrey wrote:
> Thanks for reading in advance.
>
> I've built a Smarty app on my local box by putting
> C:\Smarty in the php include_path. All works wonderfully.
>
> When I login to my host using an ftp client, the paths I can see are
>
> /sites/mydomain-com/html/
> /sites/mydomain-com/includes/
> /sites/mydomain-com/cgi-bin/
>
>
> Is there any programatical method (other than contacting the hosts tech
> support) to find out the full server path to use to initialize Smarty or do
> I have to sit and wait for tech support to get back to me? I tried using
> relative paths, '', '.' and '/templates/', etc., but it
> didn't work either.
> I also tried doing an ini_set("include_path",
> "/sites/mydomain-com/includes/"); but that didn't seem to work either.
Hi,
You can probably use php's ini_set() to append to your include path, as
such:
$oldinc = ini_get('include_path');
ini_set('include_path', $oldinc.':/sites/mydomain-com/includes');
or what have you. This is what I do at the top of a base class I have
all of my apps derive from. Hope this helps.
-Scott