Connecting Tech Pros Worldwide Help | Site Map

Im stuck with a page class

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 10:49 AM
[Mystic]
Guest
 
Posts: n/a
Default Im stuck with a page class

Hi (again).

I've created a page class for dynamicly making pages. It works fine apart
from one problem im having.

I'm making it include the main body of the page from an html file.

So: $test = new page('Page Title','filename.html');

$test->PrintHtml();

This will now include my filename.html

in filename.html I had $test->getTitle(); to get the title for the webpage,
however, if the var $test is something else, this will not work. Also, if I
do not make it global it will not work. Is there an easier way of doing
this?

Another way I thought of was replacing certian values like replacing <TITLE>
with the title etc. But I wan't this class to be dynamic, so i don't want to
this this if I dont have to.

Thanks.



  #2  
Old July 17th, 2005, 10:50 AM
ganeshg
Guest
 
Posts: n/a
Default Re: Im stuck with a page class

Use Smarty template engine (http://smarty.php.net/) unles you are learning
PHP. Smarty is more reliable and bug free, then home made scripts.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.