That's another quirk of using the PHP front end. You don't use Perl in the globals. For examples on how to do equivalents in PHP, see the time and date globals.
It would be something like:
global $HTTP_SERVER_VARS;
return isset($HTTP_SERVER_VARS["HTTP_REFERER"]) ? $HTTP_SERVER_VARS["HTTP_REFERER"] : "nowhere";
');Remember, when you use the tag in the template, you access it by:
<?print $referrer()?>
Note the ()'s, as now it's a function, not a regular variable.
Adrian
It would be something like:
Code:
create_function("", ' global $HTTP_SERVER_VARS;
return isset($HTTP_SERVER_VARS["HTTP_REFERER"]) ? $HTTP_SERVER_VARS["HTTP_REFERER"] : "nowhere";
');
<?print $referrer()?>
Note the ()'s, as now it's a function, not a regular variable.
Adrian