Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/257435-what-is-the-correct-way-to-use-includes/
Share on other sites

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.