简介:这是CodeIgniter2.0+ cli运行的详细页面,介绍了和php,codeigniter, ci, ci2.0, cli, php CodeIgniter2.0+ cli运行有关的知识、技巧、经验,和一些php源码等。
class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=350528' scrolling='no'> 1、编写方法在welcome控制器加入test方法
public function test($argv1 = null,$argv2 = null)
{
if (isset($_SERVER['REMOTE_ADDR'])) exit('No direct script access allowed');
echo "cli ok\n";
echo $argv1;
echo "\n";
echo $argv2;
}
2、执行cli
$ cd /ci目录/
$ php index.php welcome test "argv1" "argv2"