Total members 11890 |It is currently Sat Apr 20, 2024 12:51 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





I’m new to PHP and am just learning. At the moment, I’m playing around with various ways of constructing a web page to see what can and can’t be done, and how I might go about it.

I’ve got the hang of using simple includes to use a header and footer file.

This is the next step I’m trying out, and just want to know if it can be done or not, and if so, a short explanation (if there is one) would be appreciated, or pointing me to a tutorial would be great.

There’s two ideas I had to take the header and footer thing a step further, both using a shell which instead of including a header and footer, it included the page content. So, for example, I’d have a table, and in a cell, it would have an include command to pull the content from a different html/php file.

What I’m wondering whether it can be done or not is to do this almost backwards. So the file which would have the page shell, and where the include file for the content would be, it would have some kind of marker. Then the file with the content would call (include?) the web page shell, and have the content within that file that the web page shell would then put in the right place.

So you might have shell.php and content.php.

Content.php would have the content html in it, and would include shell.php at the beginning, but have some kind of marker before the html for the content that would identify the content to shell.php. So shell.php, when included) would match it to a marker in its own code, and put the content in the right place when rendering the page.

Does that make sense?

Again, I don’t know if this can be done, or if it’s a long winded way of doing something simple, etc. As I say I’m learning and experimenting at the moment, so I’m open to all suggestions!

I’m also happy to Google for a tutorial and even search the forum, but as you can tell by the long winded explanation, I don’t really know what search terms I would need to use to find what I’m looking for! (Same reason the thread title was so vague, so apologies for that too!)




Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

OK, took me a fair bit of experimentation and 'out of the box' thinking, but I think I've worked out how to accomplish the same effect.

Job done!

:gOOd:


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

you are talking about the skeleton of your application .
Header
Content .
Footer

The most used it to create a template that include all in one page . and changing the content page depending on some parameter ( Path of the page :ex :viewbody.php ) .

thanks

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : Beginner help on includes
 I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER     -  
 Hi im a beginner in java im facing problem please help me     -  
 Beginner needs help- simple 'mail_to' contact form in PHP     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com