After you download and decompress CakePHP, you will have the following file and folder structure: folder structure of CakePHP
After you download and decompress CakePHP, you will have the following file and folder structure:
- App
- Lib
- Vendors
- Plugins
- . Htaccess
- Index. php
- README
Note the following three main folders:
- AppFolder is the main place for your work: the application file will be placed here.
- LibFolder is where we work. You personallyNoEdit the content in this folder. If you edit these core files, we will not provide any help.
- Finally,VendorsFolder is the place where you need to use a third-party PHP library in your CakePHP application.
App Folder
The app folder of CakePHP is where you program the vast majority of applications. Let's take a closer look at the stuff in the app folder.
Config manages the configuration files used by CakePHP (just a few ). The configuration files of database connection details, such as configuration, user-initiated configuration, and kernel configuration are stored here. The Controller contains the Controller of your application and its components. Lib contains the first library that is not from a third party or external supplier. This allows you to separate your original internal library from the supplier library. Locale stores international string files. The Model contains the Model, behavior, and data source of your application. Plugin contains the plug-in package. Tmp
CakePHP's temporary data. Real data storage depends on how you configure CakePHP, but this folder is usually used to store model descriptions, logs, and sometimes session information.
Make sure the folder exists and is writable. Otherwise, your application will be seriously affected. In debug mode, CakePHP will issue a warning when this occurs.
Third-party classes or libraries of the Vendor are stored here. In this way, you can easily use the App: import ('upload', 'name') function to access this class or library. The sensitive observer will notice that this looks a little redundant, because there is also a vendors folder in our top-level folder structure. The difference between the two is when we release and manage multiple applications and more complex system designs. View files are stored here: Elements, error pages, assistants, la S, and View files. Webroot is installed in a product. This folder serves as the document root directory of the application. These folders are still placed in CSS style sheets, images, or JavaScript files.