Re: using eval

From: Date: Fri, 14 Dec 2001 05:38:39 +0000
Subject: Re: using eval
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77698@lists.php.net to get a copy of this message
why would you want you quote the variable? eval ("\$str = $str;"); should work. at least no more parse error. phil. rdkurth@starband.net wrote:
I keep getting this error when I use eval what am I missing Parse error: parse error in c:\httpd\doc\install.php(6) : eval()'d code on line 1 $path="/home/sites/home"; $fp3=fopen ("location.inc","w")or die("unable to open file (location.inc)"); $str='include("$path/inc/dataconf.inc");'; eval ("\$str = \"$str\";"); fwrite($fp3,"$str \n");


« previous php.general (#77698) next »