D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Quick PHP question



Neil Stone wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Salmon wrote:
| David Johnson wrote:
|
|> This is driving me insane: -
|>
|> I have a .htaccess file which calls a PHP error document if a file is
|> not found. What I need to do is grab the refering URL (i.e. the
|> location and name of the file that didn't exist) for use within the
|> PHP script.
|>
|> Everything I've tried from Google just doesn't work...
|>
|
| Try:
|  $referer = $_SERVER["HTTP_REFERER"];
|
| http://www.php.net
| has served all my php needs pretty well.
|

hey, i was close.. makes a change !!


If referer doesn't work could also try the requested URL: $request = $_SERVER["REQUEST_URI"];

--
Tom Salmon



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly