Jump to content

Recommended Posts

Hi

Most of the website when I click on menu link, it will show as a directory and page as index.php page.

 

I am new to PHP and I have created a website which has different level menus such as,

Home

Services

contact

About

and so on, I wondering, do I need to create a seperate directory for each menu item and create an index.php for each directory.

 

Which is better, creating seperate directory or one directory with different pages????

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/172125-menu-directories/
Share on other sites

Which is better, creating seperate directory or one directory with different pages

Actually the urls may look like another directory but in fact could be mod-rewritten urls or implementing the MVC pattern.

 

If it's a simple site like you have stated then just use files in the document root. Not subdirectories. i.e

 

/docs/

index.php

services.php

contact.php

about.php

 

No need to make complicated.

Link to comment
https://forums.phpfreaks.com/topic/172125-menu-directories/#findComment-907547
Share on other sites

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.