Re: Fwd: Get current URL

From: Date: Tue, 17 Oct 2000 08:03:02 +0000
Subject: Re: Fwd: Get current URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20572@lists.php.net to get a copy of this message
If you want the current URL that you are on (ie the page the user is viewing is http://www.server.com/foo.html) you can do this $URL = 'http://'.$SERVER_NAME.$PHP_SELF; You might want to double check that $SERVER_NAME is the correct variable in your phpinfo() file. You can also set this in your main config file - ie. define("MY_SERVER","foobar.com"); <-- this is useful if you load balance your site (ie. the nodes will have a $SERVER_NAME of node1-www.foobar.com, etc.) --Joe On Tue, Oct 17, 2000 at 09:58:17AM +0200, Mathijs Dijk wrote: > > > ---------- Forwarded Message ---------- > Subject: Get current URL > Date: Tue, 17 Oct 2000 09:52:45 +0200 > From: Mathijs Dijk <mathijs@max.nl> > > > Hi, > > I have a tiny anoying problem. I can't get the current URL. I've tried : > - get_env(HTTP_REFERER) & get_env($HTTP_REFERER) > - javascript:history.back(0) > - putting '#' in AHREF > > none of these try-outs worked... > Can you help me?? > > Mathijs Dijk > Max Internet Publishing > ------------------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /*****************************\ * Joe Stump * * www.Care2.com * * Office: 650.328.0198 * * Extension: 122 * \*****************************/ http://www.miester.org/Joe/Stump/Joe_Stump_resume.html -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$ N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@ 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)! ------END GEEK CODE BLOCK------

« previous php.general (#20572) next »