2008年7月21日 星期一

CLI run CI

from

http://codeigniter.com/forums/viewthread/78610/


Thanks for your help but i did a file who modify routes.php with sed (unix-command) because the OS is FreeBSD and then this file execute the index.php with the good route.
exec("sed -i.bak 's/\".*\";/\"controllers_name\";/1' ./system/application/config/routes.php",$sortie);
$argv=$_SERVER['argv'];
$argc=$_SERVER['argc'];
$str='';
for($i=1;$i<$argc;$i++)
$str=$str.' '.$argv[$i];
passthru("php index.php".$str,$s);
exit($s);

沒有留言:

關於我自己

Aspire freedom , Hope to do Soming make self complete ~