I'm not going to ask what is the best way ...? since there can be several ways to do this, I just want to learn from your experience how to manage folders and files when creating a website? (note: I am not English, so I ask here, I cannot find suitable places for an answer).
I coded for many years, but always on my own, and I never talk about how people structure their site before.
As information, I create a structure file in the root of my site, struct.php, which contains common layouts shared by many pages on my website.
If the user types in http://mywebsite.com/folder/, he requests the index file of the requested folder, which simply contains the import of the 'struct' file, for other variable parts, such as web page metadata, by creating a folder called meta that contains a file for any data type (.title, .description, .keywords), and, of course, the structure file extracts the contents of this information file and displays them in the appropriate place in the document.
I feel comfortable with this structure because it has been using it for a long time. But I would really appreciate it if you would offer tips or useful links and / or tell how you manage your own site.
user544262772
source share