The job requires that the code being run is integrated into CLI mode.
Php-f/var/www/weibok/index_cli.php Action Funciton
The project is thinkphp 2.1, then look at the manual, said define (' Mode_name ', ' Cli '). The results are useless. A look. There is no mode_name at all in 2.1, but define (' Think_mode ', ' Cli '). However, still no, no matter what module to run, are transferred to the home page.
Not even under the thinkphp of 3.0. Also jump to the home page.
Have you ever developed thinkphp Cli mode? Tell me what to do. Thank you, everyone.
Reply to discussion (solution)
13.7.4 Command mode
Command mode is used to support command-line mode for the following PHP applications, which need to be set in the Portal file:
Define (' Mode_name ', ' CLI ')? Run with CLI run mode
Under command mode, two command-line parameter modes are supported,
One, pathinfo parameter mode (Url_model is 1)
In the PathInfo parameter mode, we can call the module and the operation
index.php MODULE/ACTION/ID/4
Second, common parameter mode (Url_model set to other)
Under normal parameter mode, we need to invoke the module and operation
index.php Module Action ID 4
Under command-line mode, the system automatically converts the parameters to get variables, regardless of which command-line argument pattern we use, we can get the parameters directly using the Get variable, for example, by invoking the following method
index.php INFO/READ/CATEGORY/2/ID/4
In the controller, we can directly get $_get[' category ' (here is 2) and $_get[' ID ' (here is the 4) parameter, if you need to parse the incoming parameter order and value yourself, you need to use the native system variable $_server[' argv ' ] to get the parameters.
I have encountered the same problem, did not solve, do not know landlord now have to solve
Look, ha, can I help you?
Entry file define (' App_debug ', false); try it.
I also met the same problem, I do not know whether the landlord is not the successor?