Consider this file:
Now consider this file:
$subject = 'ERROR!';
$script = $_SERVER['PHP_SELF'];
$message = "There was an error on example.com$script";
mail($email, $subject, $message);
So, since error_check.php is included via require(), what will the PHP_SELF variable be? Since it's included in the second file, would it have the value /do_something.php, or since it is declared in the first file, will it have the value of /error_check.php?
$to = 'email@example.com';