RE: [PHP] Storing Script information in MySQL

From: Date: Mon, 04 Mar 2002 05:14:20 +0000
Subject: RE: [PHP] Storing Script information in MySQL
Groups: php.general 
Request: Send a blank email to php-general+get-87037@lists.php.net to get a copy of this message
sorry - it's eval() -----Original Message----- From: David Redmond [mailto:davidr@webcentral.com] Sent: Monday, March 04, 2002 4:09 PM To: 'Martin Towell'; php-general@lists.php.net Subject: RE: [PHP] Storing Script information in MySQL I couldn't seem to get this working. Contents of the "Text" field in the DB are; -- snip -- <? for ($i = 0; $i < 100; $i++) { echo $i ."<br>\n"; } ?> -- snip -- contents of the field are being stored in a variable, $strTest, running below produces nothing; -- snip -- <? exec($strTest); ?> -- snip -- I've removed the PHP delimetrs within the field and changed the code to something more basic (echo "Test";) and nothing is being produced. Any further ideas? Cheers -----Original Message----- From: Martin Towell [mailto:martin.towell@world.net] Sent: Monday, 4 March 2002 2:59 PM To: David Redmond; php-general@lists.php.net Subject: RE: [PHP] Storing Script information in MySQL store it as text when you get it back, do an exec() on it -----Original Message----- From: David Redmond [mailto:davidr@webcentral.com] Sent: Monday, March 04, 2002 3:56 PM To: php-general@lists.php.net Subject: [PHP] Storing Script information in MySQL Is it possible to store the contents of a PHP file within a field in a MySQL table? When the contents are retrieved, can they be executed by the PHP parser as if it were part of the actual PHP file? ie: have the following stored in the DB; -- snip -- <? echo "This is a test.<br>\n"; ?> -- snip -- Then run a PHP script to retrieve that from the DB and have below outputted to the browser? -- snip -- This is a test.<br> -- snip -- Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#87037) next »