From d7aa3e3b7e433589aba4a925b9d1f4b4bc48d23c Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 15 Dec 2003 17:28:19 +0000 Subject: [PATCH] getenv and escape in example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146507 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/misc/functions/highlight-file.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/misc/functions/highlight-file.xml b/reference/misc/functions/highlight-file.xml index 6ce21c0c86..3feac21407 100644 --- a/reference/misc/functions/highlight-file.xml +++ b/reference/misc/functions/highlight-file.xml @@ -1,5 +1,5 @@ - + @@ -85,8 +85,8 @@ if (!$script) { echo "
ERROR: Script Name needed
"; } else { - if (ereg("(\.php|\.inc)$", $script)) { - echo "

Source of: $PATH_INFO

\n
\n"; + if (ereg("(\\.php|\\.inc)$", $script)) { + echo "

Source of: ". getenv("PATH_INFO") ."

\n
\n"; highlight_file($script); } else { echo "

ERROR: Only PHP or include script names are allowed

";