[PHP] script location

2004-06-04 Thread Gabe
Does anyone know of a simple/efficient way to determine the path to a script on the URL? For instance: http://www.nowhere.com/test/whatever/testing.php All I want out of that URL is this: /test/whatever/ I didn't see an element in one of the super global variables that would provide me this

Re: [PHP] script location

2004-06-04 Thread Matt Matijevich
[snip] http://www.nowhere.com/test/whatever/testing.php All I want out of that URL is this: /test/whatever/ [/snip] http://php.net/dirname I think that will do it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] script location

2004-06-04 Thread James Harrell
See the parse_url() function. -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 9:57 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] script location [snip] http://www.nowhere.com/test/whatever/testing.php All I want out

Re: [PHP] script location

2004-06-04 Thread David T-G
Gabe -- ...and then Gabe said... % % Does anyone know of a simple/efficient way to determine the path to a % script on the URL? Gee, it sounds like you want the dirname() of the SCRIPT_URL. You're on the right track :-) HTH HAND :-D -- David T-G [EMAIL PROTECTED]

Re: [PHP] script location

2004-06-04 Thread Gabe
Thanks Matt and James... very helpful! James Harrell wrote: See the parse_url() function. -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 9:57 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] script location [snip] http

Re: [PHP] script location

2004-06-04 Thread Gabe
Knowing the functions is half the battle. :-) David T-G wrote: Gabe -- ...and then Gabe said... % % Does anyone know of a simple/efficient way to determine the path to a % script on the URL? Gee, it sounds like you want the dirname() of the SCRIPT_URL. You're on the right track :-) HTH HAND

Re: [PHP] script location

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]): Gabe -- ...and then Gabe said... % % Does anyone know of a simple/efficient way to determine the path to a % script on the URL? Gee, it sounds like you want the dirname() of the SCRIPT_URL. You're on the right track :-) Or dirname() of

Re: [PHP] script location

2004-06-04 Thread John W. Holmes
From: Gabe [EMAIL PROTECTED] Knowing the functions is half the battle. :-) GI JOE!!! ---John Holmes http://www.ebaumsworld.com/gijoe.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] script location

2004-06-04 Thread Ben Ramsey
Well, then... let me win the whole battle for you: $path = $_SERVER['REQUEST_URI']; $path = dirname($path); echo $path; You can use REQUEST_URI, SCRIPT_NAME, or PHP_SELF. Now you know, and knowing is . . . ;-) John W. Holmes wrote: From: Gabe [EMAIL PROTECTED] Knowing the functions is half the

Re: [PHP] script location

2004-06-04 Thread Daniel Clark
I use of realpath() Does anyone know of a simple/efficient way to determine the path to a script on the URL? For instance: http://www.nowhere.com/test/whatever/testing.php All I want out of that URL is this: /test/whatever/ I didn't see an element in one of the super global variables