Re: Re: Eval a file, and it gives parse error because it uses a preg_match statement with \$

From: Date: Thu, 05 Aug 2004 17:07:44 +0000
Subject: Re: Re: Eval a file, and it gives parse error because it uses a preg_match statement with \$
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-192905@lists.php.net to get a copy of this message
On Thu, 5 Aug 2004 09:51:10 -0700, Josh Acecool M <webmaster@acecoolco.com> wrote: > The files that are evaled work perfectly without being evaled. > > I dont think eval was meant for large files etc. > > Whats on that like: a preg_match that looks for \$variable = something; > > and thats the like it messes up on. > > Also, if the file which is evaled includes another file, the variables from > the included file wont get parsed or anything, and the variables set to it > by the first file, or the class dont work at all. > What version of PHP are you using? Are you doing anything to the string before eval-ing it? You say that if you just include() is, it works fine. *Why* not just include it, then? > "John Holmes" <holmes072000@charter.net> wrote in message > news:4111626E.5090202@charter.net... > > > > Josh Acecool M wrote: > > >>> var $The_Template_Sys; > > >>> > > >>>$this -> The_Template_Sys = > > >>>file_get_contents("$The_Template_File"); > > >>> > > >>>$this -> Sub_Template = TRUE; > > > Any ideas? > > > > I have an idea I said in a previous email! > > > > >>you say you're getting a parse error. How could anyone possibly help you > > >>troubleshoot that parse error unless they had an example of what was in > > >>the file being eval()'d?? > > > > What is actually in the file that's failing the eval()??!?!?! What line > > of the file is failing? What is on that line? What's on the couple of > > lines before it? What's on the couple of lines after that line that's > > failing? What does the line with the eval() call look like? Are you > > doing anything else with $this->The_Template_Sys before it's > eval()'d?????? > > > > -- > > > > John Holmes > > > > php|architect - The magazine for PHP professionals - > http://www.phparch.com > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#192905) next »