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.
|
|
|
|
|
![]() |
||
Using PHP for every page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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.
|
|
|
|
||||
|
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).
|
|
|||
|
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
|
|
|||
|
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. |
![]() |
| Tags |
| php |
| Thread Tools | |
|
|
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 |