vrana Mon Dec 15 12:28:19 2003 EDT
Modified files: /phpdoc/en/reference/misc/functions highlight-file.xml Log: getenv and escape in example Index: phpdoc/en/reference/misc/functions/highlight-file.xml diff -u phpdoc/en/reference/misc/functions/highlight-file.xml:1.9 phpdoc/en/reference/misc/functions/highlight-file.xml:1.10 --- phpdoc/en/reference/misc/functions/highlight-file.xml:1.9 Mon Dec 15 11:52:03 2003 +++ phpdoc/en/reference/misc/functions/highlight-file.xml Mon Dec 15 12:28:19 2003 @@ -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>";