Re: [PHP] Current URL?

2004-11-12 Thread John Holmes
Jason Paschal wrote: Trying to get the current viewed page's URL (query string intact). this works, but infrequently: $url = $_SERVER['URI']; How about $_SERVER['REQUEST_URI'] and this ignores the query string: $url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; or you could add/check for

RE: [PHP] Current URL

2004-06-04 Thread Stephen Craton
: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 12:59 AM To: Aidan Lister Cc: PHP-General Subject: Re: [PHP] Current URL On Fri, 2004-06-04 at 01:38, Aidan Lister wrote: Hi, You could use $_SERVER['DOCUMENT_ROOT'] That doesn't work... as the OP mentioned, the URLs might

Re: [PHP] Current URL

2004-06-03 Thread Robert Cummings
On Thu, 2004-06-03 at 23:15, Stephen Craton wrote: I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For example, let's say you were at www.example.com/files. The script is executing in this directory, and it's calling an

Re: [PHP] Current URL

2004-06-03 Thread Aidan Lister
Hi, You could use $_SERVER['DOCUMENT_ROOT'] Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 2004-06-03 at 23:15, Stephen Craton wrote: I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For

Re: [PHP] Current URL

2004-06-03 Thread Robert Cummings
On Fri, 2004-06-04 at 01:38, Aidan Lister wrote: Hi, You could use $_SERVER['DOCUMENT_ROOT'] That doesn't work... as the OP mentioned, the URLs might need to refer locally within a subsite built as a subdirectory within the document root. Cheers, Rob. Robert Cummings [EMAIL PROTECTED]

Re: [PHP] current url function

2004-03-16 Thread Marek Kilimajer
Luis Mirabal wrote: i checked http://sk2.php.net/manual/en/features.http-auth.php, but it doesnt shows how to see if i passed user:pass in the url. i try http://user:[EMAIL PROTECTED]/ and dumped globals, and there is nothing... any ideas? variables $_SERVER['PHP_AUTH_USER'] and

Re: [PHP] current url function

2004-03-15 Thread Marek Kilimajer
Luis Mirabal wrote: hey! i am working in an open source development, and have done a function that gives me the current url, but i need it to work always, everywhere, in every server with all browsers, could you tell me if you think it will or if you have any suggestions? here is the code: /*

Re: [PHP] current url function

2004-03-15 Thread Luis Mirabal
i checked http://sk2.php.net/manual/en/features.http-auth.php, but it doesnt shows how to see if i passed user:pass in the url. i try http://user:[EMAIL PROTECTED]/ and dumped globals, and there is nothing... any ideas? Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL

Re: [PHP] Current URL, Last URL, error handeling

2002-04-04 Thread Jason Wong
On Thursday 04 April 2002 21:56, Ben Edwards wrote: Is there a way I can get the whole URL of the current page for error handling/reporting. Also is there a way of getting the previous/referrer URL for a similar purpose. Have a look at the values inside $HTTP_SERVER_VARS:

Re: [PHP] Current URL, Last URL, error handling

2002-04-04 Thread Ben Edwards
Kind of but not quite. Was wondering if PHP help the actual full url. Ben At 15:26 04/04/2002, you wrote: On Thursday 04 April 2002 21:56, Ben Edwards wrote: Is there a way I can get the whole URL of the current page for error handling/reporting. Also is there a way of getting the

Re: [PHP] Current URL, Last URL, error handling

2002-04-04 Thread Julio Nobrega Trabalhando
$REQUEST_URI? If it's not the full you can complement with $HTTP_HOST or similar. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Ben Edwards [EMAIL

Re: [PHP] Current URL, Last URL, error handling

2002-04-04 Thread Jason Wong
On Thursday 04 April 2002 22:56, Ben Edwards wrote: Kind of but not quite. Was wondering if PHP help the actual full url. If you look closely you can concatenate two of those values together to get what you want. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The good life

Re: [PHP] Current URL, Last URL, error handling

2002-04-04 Thread Ben Edwards
Don't seem to exist, neither douse REQUEST_URL? At 16:13 04/04/2002, Julio Nobrega Trabalhando wrote: $REQUEST_URI? If it's not the full you can complement with $HTTP_HOST or similar. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um

Re: [PHP] Current URL, Last URL, error handling

2002-04-04 Thread Julio Nobrega Trabalhando
Okay, just phpinfo(); and use the variables. You can see whetever you will need there for url script construction. If you need, setup two pages with phpinfo() and a link between them so you can check for Referers (the Last Url you need) -- Julio Nobrega. Um dia eu chego lá: