phpstudy Steps to install ThinkPHP:
1. Download the ThinkPHP installation package, recommended: php5 download
2. Unzip the downloaded ThinkPHP and copy all files
3. Find the www folder under the phpstudy installation path, create a new tp5 folder, and paste all the unzipped ThinkPHP files into tp5
4. Restart phpstudy
5. Enter http://localhost/tp5/public/
in the browser. 6. It will be displayed as “ThinkPHP V5
ThinkPHP specifications:
1. All directories must use lowercase underscores
2. The function file name must end with .php
3. The namespace must be Consistent with the directory path: php namespace app\index\controller
4. The class library name must be consistent with the file name. The first letter must be capitalized and written in camel case: the file name is Index.php then The class library name must be class Index {...}
5. The function name must have the first letter lowercase and use camel case writing format: pubilc function getUserName(){...}
6. The first letter of the variable name should be lowercase, and the camel case format should be used: public $userName = '';
7. The constructor name should be double lowercase, and this type of file should not be used as much as possible: public function __controll(){.. .}
8. Constants must be in all uppercase letters and connected with underscores: define('APP_STATE','dev');
9. All configuration names must be in all lowercase letters and connected with download lines: 'app_namespace' => 'app',
10. The database or table name must be in lowercase letters plus a download line connection. Camel cases or capital letters are not allowed: user_name
11. Top and The namespace (directory) is uniformly called app, forming a good development method: namespace app\index\controller From the namespace point of view, this path is the path of the directory
The above is the detailed content of How to use tp5 in phpstudy. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version
God-level code editing software (SublimeText3)