GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   [PHP Programming] Website script folders (https://gfy.com/showthread.php?t=1266478)

TmJones 06-08-2017 08:11 AM

[PHP Programming] Website script folders
 
I looked at three separate scripts that I have and they have the following folders:

1) KVS - admin, blocks, contents, ftp-upload, images, js, langs, player, styles, template, temp
2) Mech Bunny TGP - admin, cache, controllers, core, csv_photos, ftp_photos, includes, media, temp_users_uploads, templates
3) Wordpress - wp-admin, wp-content, wp-includes

A person can tell that this depends of the author of the script and it will be different between the scripts. I am not asking about something as "ftp-upload" or "csv_photos" as I understand what this is but my question would be related to what are the rules of creating something like this and if there are any rules. Or scripts have the admin folder and also the includes folder. What would be the "includes" part, as far as this? I mean I can look inside and figure it out more or less, but are there any rules of creating something like this (like software design model or something like this)? Lets say I want to write a script or scripts like these, what would be the source of information about how to divide this into folders like this. I basically dont have this knowledge at this point.

fris 06-08-2017 08:26 AM

usally includes would be for some libraries or classes the script uses, general core functions.

Barry-xlovecam 06-08-2017 08:36 AM

  • Recognizable directory names -- if it is a private script use folders that only you might recognize.
  • Proper directory and file permissions.
  • Private directories and files placed or written above the Document Root's path e.g.; /home/user/[site]/off web server root/directory/files
  • A blank index.html -- Apache2 and Nginx default to 403 and 404 respectively.

A logical inheritance of directories -- the 'directory tree' -- what folder should be inside what folder.

hdbuilder 06-08-2017 11:31 AM

When you create a script you can name any folder as you wish, if your script might be installed on a domain where others might run you try to choose a unique name for the main one...

k0nr4d 06-08-2017 11:51 AM

Quote:

Originally Posted by TmJones (Post 21820444)
I looked at three separate scripts that I have and they have the following folders:

1) KVS - admin, blocks, contents, ftp-upload, images, js, langs, player, styles, template, temp
2) Mech Bunny TGP - admin, cache, controllers, core, csv_photos, ftp_photos, includes, media, temp_users_uploads, templates
3) Wordpress - wp-admin, wp-content, wp-includes

A person can tell that this depends of the author of the script and it will be different between the scripts. I am not asking about something as "ftp-upload" or "csv_photos" as I understand what this is but my question would be related to what are the rules of creating something like this and if there are any rules. Or scripts have the admin folder and also the includes folder. What would be the "includes" part, as far as this? I mean I can look inside and figure it out more or less, but are there any rules of creating something like this (like software design model or something like this)? Lets say I want to write a script or scripts like these, what would be the source of information about how to divide this into folders like this. I basically dont have this knowledge at this point.

You can make the schema however you want - it just needs to be logical. There's no "rules" saying you need to use specific folder structure. We have it broken up like we so everything has a clear place, and can be segregated if need be (ie if you need to put the ftp_content directory elsewhere, but not the rest of the videos, so it needs to be separated). If I was to do it again - i'd probably organize ours slightly differently - but we leave it as is with each version because alot of people are very familiar with our script as far as modifying it and we don't want to just up and change everything.

Model View Controller(MVC) In PHP Tutorial


All times are GMT -7. The time now is 01:57 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123