Jump to content

many directories for my site


hassank1

Recommended Posts

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

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.