473,325 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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.
Jul 17 '05 #1
1 1302
Use Smarty template engine (http://smarty.php.net/) unles you are learning
PHP. Smarty is more reliable and bug free, then home made scripts.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Adolfo | last post by:
Hello everyone, I am a newbie starting Fredrik Lundh .pdf tutorial. Running W2000. I am stuck in page four "Hello Again" program: When I try running it, it shows the root Python window very fast...
4
by: Darrel | last post by:
I'm really stuck on the concept of using public variables to pass information between usercontrols. I'm pretty sure I'm just flubbing up the syntax. This is what I want: page usercontrol 1 -...
2
by: Support | last post by:
in asp.net If I have a web usercontrol WUC with code behind Class CLASSWUC and I have a web page that loads the control Private Sub Page_Init(ByVal sender As System.Object, ByVal e As...
7
by: c#2006user | last post by:
Hi everyone. i know there is a lot of code and ive reduced it as much as i could, its a bit much to ask but i am really stuck! i've been at this for a week! this is converted from vb to c# and...
9
by: hobosalesman | last post by:
Somehow font elements are being added everywhere in my page, with size set to 4. Maybe I'm just tired but I have no idea what's going on, even weirder considering the page is XHTML 1.0 strict...
11
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem...
0
by: rsdev | last post by:
Hi, I am new to ASP.NET and I am trying to build a CMS application using theBeerHouse SK. I am adapting the Datareader to collect information from an SQL database and send it to an HtmlHeader. ...
10
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
3
BeemerBiker
by: BeemerBiker | last post by:
I want to use the C# example shown here Ok, I have done simple overrides before so I coded up protected override Auto... well, I didnt even get that far as intellisense made it clear that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.