Re: Having PHP parse code that is contained in MySQL Blob

From: Date: Tue, 16 Oct 2001 07:39:22 +0000
Subject: Re: Having PHP parse code that is contained in MySQL Blob
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71182@lists.php.net to get a copy of this message
I didn't try it myself yet, but try this: $php_code=$row['blob_from_mysql_with_php_code']; eval ("?>$php_code"); with the initial "?>" PHP should change the mode to HTML so you can just use that blob as normal HTML data with PHP Code included... for further information consult this: http://www.php.net/manual/en/function.eval.php I hope I could help you - please let me know if it works (I want to use that technique too soon) Stefan Rusterholz, s.rusterholz@interaktion.ch ---------------------------------- interaktion gmbh Stefan Rusterholz Zürichbergstrasse 17 8032 Zürich ---------------------------------- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch ---------------------------------- ----- Original Message ----- From: "Marc Pozzuoli" <p@XRentDVD.com> To: "Php-General@Lists. Php. Net" <php-general@lists.php.net> Sent: Monday, October 15, 2001 9:44 PM Subject: [PHP] Having PHP parse code that is contained in MySQL Blob > List, > I have a straightforward SELECT query that returns 10 or so rows of data, > the second column of which is a blob. I want to be able to embed PHP in the > blob in the DB and have it used when the script is run. The reason being I > need to carry a session variable through to a link in the text (that the > blob contains). Is this possible? do I need to write a function that > parses the text itself and returns PHP Code? Is that even possible? > > Thanks, > > P > Operations Manager > www.XRentDVD.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#71182) next »