|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-06 17:09 UTC] andrey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 01:00:01 2025 UTC |
In attempting to do lame macro functionality, I found that the \$login never matches strings like: Your login is $login. Here is the suspect code: while (! feof($form)) { // Grab a line at a time doing variable substitutions on $variable $line = fgets($form,1023); $new = ereg_replace("\$login", "newvalue", $line); if ($line != $new) { print "<PRE>line=[$line]</PRE>\n"; print "<PRE>new=[$new]</PRE>\n"; } print $line; } If I change \$login to just login I find I get: Your newvalue is $newvalue. Which is correct, so I think the rest of the code is correct-- just the $ escaping is broken.