Re: storing functions in a database
| From: | Datahntr | Date: | Mon, 26 Jun 2000 18:39:29 +0000 |
| Subject: | Re: storing functions in a database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-633@lists.php.net to get a copy of this message | ||
"Kris Mach" <no@spam.com> wrote in message
news:39579DF4.63AAEE84@spam.com...
> I would like to store my functions in a database instead of a include
> file, is that possible?
Yes. Why, who knows. But yes.
>
> Also if I were to store some php code in a database field, could I
> retrieve it and have it parsed through php and then spit out to the user
> instead of just having it spit out directly from the database to the
> user?
Look at "eval". I don't know how well suited it is to being used with large
chunks of code, however. You could just dump it to a temporary file and
include it, then delete the file afterward.
>
> One more question, if I were to use a java servlet and have it spit out
> php code, would it be possible to have the php code than be parsed by
> php instead of once again being spit out to the user?
You could either invoke the CGI version of PHP and run it through that and
redirect the output appropriately, or make a web server request for the
temporary file in which you have just previously stored that data.
>
> Thanks! I have been working on this, and this stumped me for the past
> couple of days.
Hope that helps.
--
O.