|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-11 05:51 UTC] zak@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Please see the codes below: <? $arrfile = '<?include("$DOCUMENT_ROOT/TEMPLATES/TOP-BANNER.HTM");?>'; if(eregi("<\?include\(\"\$DOCUMENT_ROOT/TEMPLATES/TOP-BANNER\.HTM\"\);\?>",$arrfile)) print "good\n"; else print "bad\n"; ?> The result will return "bad" because the eregi can't find the expression in the $arrfile. If I removed the $, it will return "good". I guess "$" can't be escaped inside the eregi function. Please help.