Re: Executing scripts from a table

From: Date: Fri, 02 Feb 2007 17:45:20 +0000
Subject: Re: Executing scripts from a table
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-248202@lists.php.net to get a copy of this message
Yeah, that was it. Thanks, Thomas. (dang it, I should have been able to figure out that myself!) Ken On Feb 2, 2007, at 11:32 AM, Thomas Pedoussaut wrote:
Ken Kixmoeller -- reply to ken@kixmoeller.com wrote:
Hi, folks -- - - For security and efficiency, I am trying to store PHP scripts in MySQL tables. Only problem: I can't get them to execute. In a template: ---------------------------------------- $php_code = $this->ApplicationObject->GetStoredCode($whichpage); echo $php_code; // doesn't execute print_r($php_code); // doesn't execute, either ----------------------------------------
I think you're thinking of eval() http://ie2.php.net/manual/en/function.eval.php It should do what you want. --Thomas


« previous php.general (#248202) next »