TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:10164] PHP and apache alias



On Tue, Nov 16, 1999 at 04:12:52PM -0600, Amy Tebbe wrote:
> I'm having trouble using an apache alias in a php include statement. 
> Example: 
> 
> I have an apache alias named /templates like so: (in .conf file)
> 
> Alias /templates /usr/httpd/virtual/www.site.com/html/templates/
> 
> 
> If I do
> 
> 	include("/templates/blah.php3");
> 
> it can't find the file
> 
> If I use relative path, like:
> 
> 	include("../templates/blah.php3");
> 
> it works.
> 
> Note also, that I can use the /templates in an <a href> and it works
> fine so this seems to be a php include issue.
> 
> Any ideas?

	Is there a way to put a variable in an Apache .conf file that
you can access from a PHP script?  You could fill that variable with the
absolute path of the appropriate templates directory, and then use it
whenever you include something in a PHP script.

> Thanks!
> -- 
> Amy Tanner                                      Voice: 612.943.8700
> Real Time Enterprises, Inc.	                  Fax: 612.943.8500
> amy@real-time.com		    	   http://www.real-time.com
> PGP fingerprint =  67 6C 8F DB B1 7A 8D 41  DC 7B CA 0B 28 1E 67 AD 

	Your PGP key (id 0x8A354275?) doesn't have a self-signature,
making it invalid under the current RFCs.  You should use PGP to
explicitly self-sign your public key, then re-upload it to the public
keyservers.

Have fun (if at all possible),
-- 
Its name is Public Opinion.  It is held in reverence. It settles everything.
Some think it is the voice of God.  Loyalty to petrified opinion never yet
broke a chain or freed a human soul.     ---Mark Twain
-- Eric Hopper (hopper@omnifarious.mn.org
                http://ehopper-host105.dsl.visi.com/~hopper) --

PGP signature