[Phpwm] Site Structure

Peter Graham Peter.Graham at tcat.ac.uk
Fri Dec 9 11:25:17 GMT 2005


If you use a headers and footers instead your URL's will be nicer, since
you wont be passing a variable in them.
 
Google prefers "nice" url's and will give you a higher rank. They are
often easier for visitors to type/remember.
 
For example:
www.yoursite.com/page.php is nicer than
www.yoursite.com/index.php?page=12
 
hope this helps,
Pete

________________________________

From: phpwm-bounces at mailman.lug.org.uk
[mailto:phpwm-bounces at mailman.lug.org.uk] On Behalf Of Matt Harris
Sent: 09 December 2005 10:55
To: phpwm at mailman.lug.org.uk
Subject: [Phpwm] Site Structure


Hi Folks,

Hope your all ok.

I was after some basic advice, regarding setting up my site using php
(this is my first php project).

I have my index page with two divs, one for the menu and one for the
content where I pull in the different pages, by setting a variable thats
the name of the page, in the url. Below is the code I have in my index.

<?php
if (isset($_GET['page'])) {
$page = $page . "." . "php";
include("$page");
}
else {
include("welcome.php");
}
?>

This works fine, but if I want to redirect the user to a different page
using the header function, I get an error because there is html on my
index page, before the php code.

How do you guys go about setting up your sites in a resourceful way?

Am I just better off sticking to including a header and a footer on all
my pages?

Any advice would be much appreciated.

Many thanks.

Matt


________________________________

Play Santa's Celebrity Xmas Party
<http://santas-christmas-party.yahoo.net/> , an exclusive game from
Yahoo! 

####################################################################################################
This email is confidential and intended solely for the use of the individual to whom it is addressed.
Any views or opinions presented are solely those of the author and do not necessarily represent those 
of Telford College of Arts & Technology.
If you are not the intended recipient, be advised that you have received this email in error and that
any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited.

If you have received this email in error please notify the Telford 
College of Arts & Technology I.T. Helpdesk by telephone on 44 (0)1952 
642284.

Any files attached to this e-mail will have been checked with virus 
software before transmission.  However, you should carry out your own 
virus check before opening any attachment.  Telford College of Arts & 
Technology accepts no liability for any loss or damage, which may be caused by software
viruses.
####################################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/phpwm/attachments/20051209/55b49a9d/attachment.html


More information about the Phpwm mailing list