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

From: Date: Tue, 28 Jan 2003 18:53:30 +0000
Subject: RE: [SMARTY] discovering the full path on shared unix host
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7377@lists.php.net to get a copy of this message
I have the include path working -- at least, a simple 'echo' statement I did as a test was included as expected from my includes folder. FWIW, I found this to be helpful on www.php.net/manual/en/function.realpath.php: $obj = apache_lookup_uri("/~username"); Then $obj->filename gives you "/home/username/public_html", or whatever it is in your case. This told me my actual path was /www/mydomain-home/sites/mydomain-com/includes/ I'm using your suggestion to append that onto the end of $oldinc from ini_get, which sets the include path properly. So Thanks for that tip. I would expect to be up and running at this point, but I'm still getting a blank white page?! Any other thoughts? > -----Original Message----- > From: Scott Barron [mailto:sb125499@ohiou.edu] > Sent: Tuesday, January 28, 2003 11:33 AM > To: smarty-general@lists.php.net > 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 > >

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