logo       

Re: [SMARTY] discovering the full path on shared unix host: msg#00401

php.smarty.general

Subject: Re: [SMARTY] discovering the full path on shared unix host

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

--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise