$_SERVER["DOCUMENT_ROOT"]
,'__FILE__' => __FILE__
,'$_SERVER["SCRIPT_FILENAME"]' => $_SERVER["SCRIPT_FILENAME"]
);
function e($txt) {
if (is_string($txt)) {
return htmlspecialchars($txt, ENT_QUOTES, 'UTF-8');
} else {
return '' . htmlspecialchars(var_export($txt, true), ENT_QUOTES, 'UTF-8') . '';
}
}
function rp() {
if (! isset($_POST['rp']) || ! is_string($_POST['rp'])) {
return '';
}
return get_magic_quotes_gpc()
? stripslashes($_POST['rp'])
: $_POST['rp'];
}
header('Content-Type: text/html; charset=utf-8');
?>
Test of $_SERVER and realpath()
Test of $_SERVER and realpath()
$value): ?>
= e($key) ?>
| value | = e($value) ?> |
| realpath(value) | = e(realpath($value)) ?> |
$_SERVER['REQUEST_URI']
| value | = e($_SERVER['REQUEST_URI']) ?> |
Test realpath()