Re: Absolute or relative paths
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Absolute or relative paths

From: Jerry Stuckle <jstucklex@attglobal.net>
Date: Sat Jul 09 2005 - 21:33:44 CEST

michelle wrote:
> Hi all,
>
> I am having trouble using with using paths on my website. Is there a
> way to use an absolute path that always refers to the website's root
> directory...or do I need to use a relative path?
>
> The problem I am having is how to refer to my "/images" directory no
> matter where it is referenced in the website's directory structure.
>
> I have used the URI (http://www.mysite.com/images), but that seems too
> complex, especially if I needed to reference other directories. I know
> that PHP must have a simpler solution.
>
>
> Thank you in advance,
>
> Miki

Check out $_SERVER['DOCUMENT_ROOT']

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Received on Mon Oct 17 21:04:37 2005