AN INSTRUMENTAL EXPERIMENTAL

Files

PHP View: globals.php
<?php $parts pathinfo($_SERVER['SCRIPT_NAME']); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Globals of <?php print($parts['dirname']); ?></title>
</head>
<body>
<h1>Globals of <?php print($parts['dirname']); ?></h1>
<hr>
<pre><?php 
$file 
__FILE__;
$include_path str_replace($_SERVER['SCRIPT_NAME'],'/',$_SERVER['SCRIPT_FILENAME']);
print_r($GLOBALS);
foreach (
$GLOBALS as $key => $value) {
    if (empty(
$value)) {
        print(
'$'.$key." is empty.\n");
    } else {
        print(
'$'.$key.' contains '.$value."\n");
    }
}
?></pre>
<hr>
<address><?php print('PHP '.PHP_VERSION.' at '.$_SERVER['HTTP_HOST'].' Port '.$_SERVER['SERVER_PORT']); ?></address>
</body>
</html>