Can you paste PHP code into my database pages on mySQL?
It looks like you can paste anything into those pages but the problem that I had before was the PHP script doesn't seem to work!? I'm talking about when I have a dynamic Web site and "pages" are being accessed from the database..
At a guess, sounds like a job for eval(). However, as the creator of PHP is alleged to have said, "If eval() is the answer, you're probably asking the wrong question." (e.g.: why do you want to store PHP code in the DB, and what happens if some hacker manages to stick some nasty code into your DB?)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
So I suppose I should integrate my features or add-ons to my Web site in some other manner? Like for instance if I want to add form processing, a php calculator, etc..
Typically you use include files (often using one file per class definition if going object-oriented, otherwise perhaps loading function definitions and other procedural code) which you can require()/require_once() as needed.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks