ragrim Posted February 21, 2012 Share Posted February 21, 2012 Hi, Im pretty much self taught when it comes to php, never read any books just picked things up as i go, and im looking for some advice on how i build my pages as i believe im not approaching it correctly. Basically i build an index.php, this contains my header, footer, and any menus i may have, then for my content pages, in this case products, contact, about us i use use an include so these content pages just have content. Now by doing this my address bar looks like this index.php?location=contact.php for the sake of google and search results and so on, am i limiting my ability to be found by not using a differant file for each page? should i include a header, footer, menu etc within my content pages rather than the other way around? Thanks in advance for any advice. Quote Link to comment https://forums.phpfreaks.com/topic/257435-what-is-the-correct-way-to-use-includes/ Share on other sites More sharing options...
WatsonN Posted February 21, 2012 Share Posted February 21, 2012 If you do it the way you are doing it, via the address bar, I would use custom names instead the file name. If you don't someone could call a filename and load one. You are not losing Google juice from doing that I personally include the header and footer but you can do it either way, it won't make a difference to the user. Quote Link to comment https://forums.phpfreaks.com/topic/257435-what-is-the-correct-way-to-use-includes/#findComment-1319437 Share on other sites More sharing options...
requinix Posted February 21, 2012 Share Posted February 21, 2012 If you don't someone could call a filename and load one. Such as index.php?location=index.php And boom goes the dynamite. Quote Link to comment https://forums.phpfreaks.com/topic/257435-what-is-the-correct-way-to-use-includes/#findComment-1319444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.