Thinkphp5 command line mode execution, how to perform database operations

I can perform database operations
localhost/user/man/list

when I access it in the browser.

in the command window, cd enters the public directory, and then you can execute the code according to the normal thinkphp request mode. Even if you cannot execute the database-related code, you will not report an error

.

php index.php user/man/list

Mar.15,2022

TP5 use php think to use command line mode. Why do you use it this way? this seems to be the use of CI.
add a link: Custom Command Line


excuse me, have you solved it? how do you solve this?


solution: https://blog.csdn.net/u013358.

Menu