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
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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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