hassank1 Posted May 5, 2008 Share Posted May 5, 2008 I am building a php site .. a social network .. however the php files are growing ... for now > 50 files .. so to organize the site I was thinking to put files into different directories based on subjects for example dir (messages) : addmsg.php , replymsg.php , viewmsg.php... dir (topics ) : addtopic.php , viewtopic.php .... etc . . . I think it's a good idea.. however maybe I've missed something and b4 doing this step I want to make sure if it's a good idea ... and what's the advantages .. disadvantages .. etc... thanks. Link to comment https://forums.phpfreaks.com/topic/104191-many-directories-for-my-site/ Share on other sites More sharing options...
bilis_money Posted May 5, 2008 Share Posted May 5, 2008 how about trying (framework) phpcake, codeigniter, symfony etc... they have good directory structure. Link to comment https://forums.phpfreaks.com/topic/104191-many-directories-for-my-site/#findComment-533398 Share on other sites More sharing options...
MadTechie Posted May 5, 2008 Share Posted May 5, 2008 its not a problem but you may get lost when pointing to the correct file.. what i tend to do (depending on the project) is create sets like:~ class/ ....../msg ....../topics templates ....../msg ....../topics javascript ....../msg ....../topics css ....../msg ....../topics then in my config.php i have contants for each set define("pathclass", "class"); define("pathcss", "css"); define("msg", "msg"); define("topics", "topics"); echo pathclass.topics; // for class/topics Link to comment https://forums.phpfreaks.com/topic/104191-many-directories-for-my-site/#findComment-533404 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.