Click to See Complete Forum and Search --> : should 1 x php page do it all?


jasnjohn
01-17-2004, 03:57 AM
I know one the beauties of PHP is that it can update only the necessary parts of a page without overloading the server/browser with unecessary updating of the same information.

My personal site, which I've finally just about completed (it's never complete:o)) is developed solely on a single php page.
I use include "blahblah.txt" depending on which menubutton was pressed, so the main frame just gets refreshed with the contents of that menu category.
I think it works really well, and really fast, but is there any rule or advice which suggests you should just stick with 1xphp page per category?

eg; contact.php, news.php, family.php, instead of just index.php, and bringing in the required contents?
I notice many sites don't do this, which suggests to me that it's perhaps "not the done thing".

Any experienced PHP'ers out there can respond to this, I'd greatly appreciate it.

Thanks for reading this far..

AdamGundry
01-17-2004, 04:42 AM
I think the main problem with only having a single page is that it confuses browser histories, search engines and other automated logs. In particular, some search engines may only be able to crawl your default page. Also, if your host provides access to the server logs they are not much use if all traffic accesses one page.

Adam

jasnjohn
01-17-2004, 07:28 AM
Very true.
Thanks.