TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:10164] PHP and apache alias
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.
>
PHP include (and require) uses the UNIX filesystem, so you would need to
use the full path of the file.
include("/home/httpd/html/templates/blah.php3");
or whatever. It is processed before it is sent to the web browser.
> 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?
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
--
Clay Fandre
cfandre@maddog.mn-linux.org
Twin Cities Linux Users Group
http://www.mn-linux.org