/usr/bin/php /***/app/Console/cake.php Importcsv index args -app /***/app
・php へのパス
・cake.php へのパス
・シェル名(=Shell クラスの名前から末尾の”Shell”を除いたもの)
・メソッド名
・引数
・コマンド”-app”
・appまでのパス
/usr/bin/php /***/app/Console/cake.php Importcsv index args -app /***/app
・php へのパス
・cake.php へのパス
・シェル名(=Shell クラスの名前から末尾の”Shell”を除いたもの)
・メソッド名
・引数
・コマンド”-app”
・appまでのパス
<?php | |
class ImportcsvShell extends AppShell | |
{ | |
var $uses = array('Serials'); | |
function main(){} | |
function index(){ | |
$arg0 = $this -> args[0]; //コマンドで渡した引数の受取 | |
$data = $this->Serials->find('all'); | |
var_dump($data); | |
} | |
} |