Using PHP for every page

This is a discussion on "Using PHP for every page" within the PHP Forum section. This forum, and the thread "Using PHP for every page are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 27th, 2007, 15:56
Reputable Member
Join Date: Jan 2004
Location: California
Age: 19
Posts: 232
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via AIM to tox0tes
Using PHP for every page

Is there a downside to making all pages end in .php? Is it harder for robots to crawl? I am thinking of doing this because of how easy it is to make separate files for the header and footer so that I don't have to update every page when changing a link or copyright.
Reply With Quote

  #2 (permalink)  
Old Jun 27th, 2007, 16:02
BGarner's Avatar
Reputable Member
Join Date: Oct 2006
Location: In front of the computer.
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using PHP for every page

I don't think there's a down side since php includes just insert the code before the browser even sees it. Check out this article on php includes (and the link to the continuation of that article at the end of the page).
Reply With Quote
  #3 (permalink)  
Old Jun 27th, 2007, 16:22
Reputable Member
Join Date: Jan 2004
Location: California
Age: 19
Posts: 232
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via AIM to tox0tes
Re: Using PHP for every page

That's what I thought - I have been using .shtml for a long time because it does basically the same thing... but I'm going to start using PHP
Reply With Quote
  #4 (permalink)  
Old Jun 28th, 2007, 07:42
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using PHP for every page

My main site has all its pages served via PHP. A couple of thoughts ....

a) If you use a .htm or .html extension for pages that are "naturally unchanging", any human who views / types the URL will be given the confidence that he / she is going to a nice straightforward page and won't worry about what code he/ she is running

b) Watch carefully caching and storage headers. Many a browser will retain a truely static page (or image) for a while to save bandwidth, but unless you take specific action with headers, PHP will feed each time.

Note that with both of these issues that I refer to for a human visitor, intelligent robots can have the same issues / reach the same conclusions.

By the way - on a techincal note, we use apache mod_rewrite to wrap standard code around all of our pages in most directories, and we change the .html and .htm into PHP via the httpd configuration file.
Reply With Quote
Reply

Tags
php

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to prevent access to page B except via page A? Donny Bahama PHP Forum 1 Apr 3rd, 2008 02:15
Green bar of colour at bottom of page gets bigger the more page is extended pixelgirl Web Page Design 1 Apr 1st, 2008 01:27
internal navigation, Linking from one page to a specific div in another page. Oak Web Page Design 5 Feb 8th, 2008 22:54
Linking an outside page back to previous framed page MJustison Starting Out 1 Oct 18th, 2007 17:49
A gap appears beween the Page Title and the Body Content of the page. sovereign6 Web Page Design 6 Dec 18th, 2006 19:14


All times are GMT. The time now is 07:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43