473,320 Members | 1,930 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,320 software developers and data experts.

Page title with MULTIPLE include pages

I am putting together a website using php include and I am finding it difficult to find a way to include the title and meta tags from each include file since the page I am including them on already has, and needs, a header tag for java pop up menu. I found what seems to be a solution but it only works for one include page.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <?php
  4. ob_start();
  5. ob_implicit_flush(0);
  6. $incPage = "folders/my_include.php";
  7. include($incPage);
  8. $pageContents = ob_get_contents();
  9. ob_end_clean();
  10. ?>
  11. <title><?php print($pagetitle); ?></title>
  12. </head>
  13. <body>
  14. <?php print $pageContents; ?>
  15. </body>
  16. </html>

My php is for multiple pages so how could I do that?

Thanks in advance.

Dave
Sep 17 '10 #1
1 1595
code green
1,726 Expert 1GB
Put all the header stuff in a seperate file and call it with include_once
Sep 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
6
by: Don Grover | last post by:
How can I get the page title into an variable to handle in my asp. Don
6
by: Wladimir Borsov | last post by:
I would like to load multiple web pages from Internet into ONE single browser window - one below the other. How do I do that most easily ? One idea is to built a frameset (for e.g 6 web pages)...
3
by: TC | last post by:
Hello, In ASP.Net via C#, but if someone can help me with a VB.Net example that's fine too, I am trying to redirect to a page that is already open. For example, when a user clicks a submit...
5
by: Maxim Izbrodin | last post by:
Hello For displaying page titles for my ASP.NET applications I use the following technique <title><%=BannerModule.PageTitle%></title where BannerModule.PageTitle is a public field of my user...
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
4
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses more than one master page. Currently, there are two pages, Freedom1.master and Freedom2.master. I have no problems with Freedom1.master. However,...
3
by: Mike P | last post by:
How do you set the title of content pages? I can set the title of my master pages, but I want each of my content pages to have a different title. *** Sent via Developersdex...
1
johnbob2010
by: johnbob2010 | last post by:
Is it possible to grab something off a given web page (like page title) and send that along with the form when they click submit? I guess the question is - can I variablize the page title and then...
10
by: StarWallace | last post by:
http://microstudios.co.cc/ I assume that this should be quite easy but i just cant figure this out at all... I'm trying to make it so that the title of the page changes depending on the page that...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: 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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.