Tp6 Writing shorthand

  • content
  • comment
  • relevant

install

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

composer create-project topthink/think tp

Command line creation api (multi application mode needs to delete the default application to take effect)

php think make:controller Bio@Api --api

Command Line Create Model

Composer require topthink/hint orm (first time)

php think make:model Bio/Taxa

Corresponding url

http://xxx.com/index.php/Bio/api/ Method name/parameter/x

effect

Use sqllite

Root Directory.env

[DATABASE]
TYPE = sqlite
HOSTNAME = 127.0.0.1
DATABASE = "/www/wwwroot/xxx/xxx.db"
USERNAME = username
PASSWORD = password
HOSTPORT = 3306
CHARSET = utf8
DEBUG = true

comment

zero Comments

Post reply

Your email address will not be disclosed. Required items have been used * tagging