Run crond and thinkphpcrond in Thinkphp. In Thinkphp, run crond. thinkphpcrondthinkphp to enable cli support. 1. tp supports cli command mode. the path of the manual is 13.7.4. if other frameworks do not support cli, then you can only execute crond and thinkphpcrond under Thinkphp.
Enable cli support for thinkphp1. tp supports cli command mode. the path of the manual is 13.7.4. if other frameworks do not support cli, you can only write programs directly, it is actually the most basic php code for process-oriented writing. 2. open the command in the portal file and add a define ('mode _ name', 'cl'). The website generally has modules that can be accessed through webpages, therefore, you can create a cli entry such as index_cli.php, so that other modules can enter through the normal Portal. In some manuals, the cli defines define ('think _ mode', 'cli '). It may be of different versions. pay attention to this.
/Bin/php/home/nginx/html/pet/index. php Crond/test
# The above is the test method executed by the shell script under crond
Why does the following code always return an error when adding data in THINKPHP?
1: Does the id of your data table set a primary key? If you insert $ id with the same value each time, the insertion will fail. Set id to auto-increment, and delete $ data ['id'] = "$ id.
2: $ oline = M ("Oline ");
$ Data ["id"] = "$ id ";
$ Data ["to"] = "$ ";
$ Data ["time"] = "$ t ";
$ Data ["ip"] = "$ _ ip ";
$ Oline-> add ($ data );
Echo $ oline-> getlastsql (); exit;
Copy the output SQL statement to mysql for execution.
How does THINKPHP allow all methods in a class to execute a verification method before execution?
If it is simple, you can first write a class, execute some verification methods in this class, and then let the class you execute inherit from this class.
In fact, there is a better example in thinkphp that meets your requirements.
It is called RBAC, that is, permission control management.
You can go to the following Example on the official website: RBAC in the Example file.
As for the specific usage method, we recommend that you take a look at this video, which is very detailed. you can proceed step by step !!
Www.tudou.com/programs/view/YyfoP5pzdBo/
Under the http://www.bkjia.com/PHPjc/853721.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/853721.htmlTechArticleThinkphp to execute crond, thinkphpcrond thinkphp to enable cli support 1, tp just supports cli command mode, the path of the manual is 13.7.4 if other frameworks are used does not support cli, then only straight...