getenv and escape in example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146507 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2003-12-15 17:28:19 +00:00
parent 27960e632c
commit d7aa3e3b7e

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 -->
<refentry id="function.highlight-file">
<refnamediv>
@ -85,8 +85,8 @@
if (!$script) {
echo "<br /><b>ERROR: Script Name needed</b><br />";
} else {
if (ereg("(\.php|\.inc)$", $script)) {
echo "<h1>Source of: $PATH_INFO</h1>\n<hr />\n";
if (ereg("(\\.php|\\.inc)$", $script)) {
echo "<h1>Source of: ". getenv("PATH_INFO") ."</h1>\n<hr />\n";
highlight_file($script);
} else {
echo "<h1>ERROR: Only PHP or include script names are allowed</h1>";