Re: ERROR with FastTemplate ????

From: Date: Fri, 03 Nov 2000 16:01:03 +0000
Subject: Re: ERROR with FastTemplate ????
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-23589@lists.php.net to get a copy of this message
> > When i parsing the page i've got this error: > > Warning: Invalid content of \{\} in > > /home/parkavim/www/class.FastTemplate.php3 on line 199 > > The line of this error is: > > Line 199: $template = > > ereg_replace("\{$key\}","$val","$template"); > > Try this instead: > $key = '{'."$key".'}'; > $template = ereg_replace("$key","$val","$template"); > > PHP 4 doesn't like {$ combinations. > > You will have the same problem around line 410 also. You can get the patch > that fixes this from > http://www.thewebmasters.net/php/FastTemplate.phtml Thanks all for help, i change 196 line to: > $key = '{'."$key".'}'; > $template = ereg_replace("$key","$val","$template"); , but the error repeated :) and i add small changes to these lines: > $key = '\{'."$key".'\}'; > $template = ereg_replace("$key","$val","$template"); and then it works perfectly.. Thanks Best regards Nikolajus Krauklis

« previous php.general (#23589) next »