When I try to run it I get the following error
Warning: Undefined variable: qualified_me in /home/www/ecsbi/lmu/robert/mymarket/application.php on line 49
Fatal error: Call to undefined function: () in /home/www/ecsbi/lmu/robert/mymarket/application.php on line 49
This is the line in the application.php file
Code: Select all
/* setup some global variables */
$ME = qualified_me();Code: Select all
function me() {
/* returns the name of the current script, without the querystring portion.
* this function is necessary because PHP_SELF and REQUEST_URI and PATH_INFO
* return different things depending on a lot of things like your OS, Web
* server, and the way PHP is compiled (ie. as a CGI, module, ISAPI, etc.) */
if (getenv("REQUEST_URI")) {
$me = getenv("REQUEST_URI");
} elseif (getenv("PATH_INFO")) {
$me = getenv("PATH_INFO");
} elseif ($GLOBALS["PHP_SELF"]) {
$me = $GLOBALS["PHP_SELF"];
}
return strip_querystring($me);
}
function qualified_me() {
/* like me() but returns a fully URL */
$HTTPS = getenv("HTTPS");
$SERVER_PROTOCOL = getenv("SERVER_PROTOCOL");
$HTTP_HOST = getenv("HTTP_HOST");
$protocol = (isset($HTTPS) && $HTTPS == "on") ? "https://" : "http://";
$url_prefix = "$protocol$HTTP_HOST";
return $url_prefix . me();
}
function match_referer($good_referer = "") {
/* returns true if the referer is the same as the good_referer. If
* good_refer is not specified, use qualified_me as the good_referer */
if ($good_referer == "") { $good_referer = qualified_me(); }
return $good_referer == get_referer();
}
function redirect($url, $message="", $delay=0) {
/* redirects to a new URL using meta tags */
echo "<meta http-equiv='Refresh' content='$delay; url=$url'>";
if (!empty($message)) echo "<div style='font-family: Arial, Sans-serif; font-size: 12pt;' align=center>$message</div>";
die;
}