r00t Posted March 27, 2008 Share Posted March 27, 2008 Hi people! I need your help. Being myself new in learning web-programming made the following question born. How the files and folders in ../www are located. Let's say that I need a usual site containing main page, forum, chat, guest book, photo gallery, news and RSS-feed and of course the administration. I will use AJAX, OOP and also I have read an article about MVC(interesting thing). Soo, I need all files and folders to be located in www structured and very logically. Please don't say that I have to learn those things listed above first. I know how they work and have at least an idea. I just need the structure of folders. Waiting for suggestions and help! Thanx in advance! Quote Link to comment https://forums.phpfreaks.com/topic/98210-hierarchy-and-strucutre-of-the-website/ Share on other sites More sharing options...
redbullmarky Posted March 27, 2008 Share Posted March 27, 2008 before i go on though, i'm sort of confused why you state you will use AJAX and OOP - do you know why? are they specifically required by your site, or are they just buzzwords or things you think you should be using? not being unnecessarily negative here, but your decisions on what technologies and the structure of your app can directly influence/help your decision of your site structure. a "conventional" structure would be to organise your folders based around your sitemap - ie, top level folders for stuff like 'about us', etc and have your pages within. a more complex approach, normally encouraging/encouraged by OOP, would be to follow an MVC structure. so as you can see - might be worth plotting out your exact requirements first, what you think you might need in the future, etc and then plot out a proper structure. Quote Link to comment https://forums.phpfreaks.com/topic/98210-hierarchy-and-strucutre-of-the-website/#findComment-502550 Share on other sites More sharing options...
roopurt18 Posted March 27, 2008 Share Posted March 27, 2008 This is entirely arbitrary and there is no right answer. The best thing you can do is download some existing frameworks and see how they organize things. After that you need to try and come up with something on your own and after a few hundred iterations you'll eventually develop an organization that works for you. Quote Link to comment https://forums.phpfreaks.com/topic/98210-hierarchy-and-strucutre-of-the-website/#findComment-502552 Share on other sites More sharing options...
Daniel0 Posted March 28, 2008 Share Posted March 28, 2008 Even though there is multitude of ways you can organize your files, I'd recommend having a single index.php file which is stored within the document root. That file would then include files which are below the document root. If it isn't a file that should be directly accessed by the client, then there is no point in storing it a publicly accessible place. Quote Link to comment https://forums.phpfreaks.com/topic/98210-hierarchy-and-strucutre-of-the-website/#findComment-502886 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.