Store PHP in a MySQL Database
Tuesday April 11, 2006
You can store your entire website in a MySQL database. This includes both page content, and PHP code. You then retrieve the appropriate content and code to build each page of your site. You use can Print or Echo the content and HTML, and Eval the PHP code, as shown in our example.


Can you use classes in this? Example:
class clsMyClass {
var $myvar;
function clsMyClass() {
$this->myvar = “hello”;
}
}
then call from another page stored in MySql:
$oMyClass = new clsMyClass();
echo $oMyClass->myvar;
I did notice that the insert statement for the template has an omission, this being the end head tag. This /head tag should be betwen the end title and body start tags.
However it should be rectified to ensure that user’s web pages are compliant with web standards.
I found your code very enlightening, which has given me a different perspective on how I should build pages.
Regards
Chris