View Full Version : ways to better performance for class
michelle
08-28-2002, 02:05 PM
Hi, currently I use a class to set content for my page.
/* An example */
$home -> SetContent("This is my content");
Well, this is just a quick content display. What if I've a set of content with tables and content which lead to very large display and I do not wish to use PHP to parse it. How should go around doing that?
Thanks in advanced
Spookster
08-28-2002, 02:58 PM
If you want to include content into a page just use the include function:
include("file.html");
or
include($filename);
if you want to pass a parameter and tell the page which file to include.
I don't know what you are using in your class to parse content and put it into the page so I cannot offer further suggestions.
michelle
08-28-2002, 03:06 PM
Oh, I'm sorry spookster, my bad. I 've also header and footer.
function Display()
{
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
echo "<html>\n<head>\n";
$this -> DisplayTitle();
echo "</head>\n";
echo $this->content;
$this -> DisplayFooter();
echo "</body>\n</html>\n";
}
/* so I have something like that on the main page */
$start = new myClass();
$start -> SetContent('my content');
$start -> Display();
/* therefore I can't have an include */
Any idea to output my content without using php to parse it?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.