pascal_22 Posted August 12, 2013 Share Posted August 12, 2013 Hi everyone. I create a website and now i want to optimize it and well structure it. Actually, all php file are in root directory and i want to well structure it. Is there a better way to structure it? i mean, include file should be with or not with display php page?, And what about processing page that validate form and inserting/update row in database then redirect to another page... they should be in their own folder? Thanks for your help. Pascal Link to comment https://forums.phpfreaks.com/topic/281088-how-to-correctly-structure-php-file/ Share on other sites More sharing options...
BorysSokolov Posted August 12, 2013 Share Posted August 12, 2013 The general rule is to separate the logic from the markup. As far as file structure goes, there isn't a single, definite way. Commonly, the index would be in the root directory, and the includes, stylesheets, javascript, and any additional files would be divided into separate folders. Link to comment https://forums.phpfreaks.com/topic/281088-how-to-correctly-structure-php-file/#findComment-1444589 Share on other sites More sharing options...
pascal_22 Posted August 12, 2013 Author Share Posted August 12, 2013 Thanks alot!! You right!! I appreciate!!! Link to comment https://forums.phpfreaks.com/topic/281088-how-to-correctly-structure-php-file/#findComment-1444590 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.