Re: Relative Url
| From: | Chris Thomas | Date: | Fri, 02 Apr 2004 13:37:08 +0000 |
| Subject: | Re: Relative Url | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182117@lists.php.net to get a copy of this message | ||
What im trying to do is this.
I working on creating a poll script, and right now it consists of 3 main
files:
poll.php - Which does the server-side processing
pollFunctions.php - Which draws the poll and does some client side stuff
poll.css - stylesheet
These files reside in the /poll directory (for now)
pollFunctions.php is included in the file that wants the poll, which may
reside in any folder.
So what im trying to figure out is the relative url of where the
pollfunctions.php file resides.
-- Now that i think about it i could just include the stylesheet from the
calling file (ie index.php)
I probally should have thought of this a little more before i posted...oh
well
Chris
"Chris Shiflett" <shiflett@php.net> wrote in message
news:20040401165403.50351.qmail@web14310.mail.yahoo.com...
> --- Chris Thomas <cwthomas@connectmail.carleton.ca> wrote:
> > Is there anyway that i can get a url relative to my server for a
> > script that is being run??
>
> $relative_url = '/';
>
> That's a relative URL to your document root. What are you wanting,
> exactly?
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security - O'Reilly
> Coming Fall 2004
> HTTP Developer's Handbook - Sams
> http://httphandbook.org/
> PHP Community Site
> http://phpcommunity.org/