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 $_SERVE
From: 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.
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 PR
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 direct
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 i
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 $_SERVER['PHP_AUTH
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 PROTE
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:
/*
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á:
http://sourceforge
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? Q
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
$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 PROTE
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 pr
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:
print_r($HTTP_S
14 matches
Mail list logo