「 引数 」 一覧
-
CakePHP3 Shell(シェルスクリプト)に引数を渡す方法
CakePHP3 Shell(シェルスクリプト)に引数を渡す方法です。
12345678910111213// 新規作成ファイル「src/Shell/sampleShell.php」<?phpnamespace App\Shell;use Cake\Console\Shell;class sampleShell extends Shell {public function main() {echo 'Shellテスト' . (isset($this->args[0]) ? $this->args[0] : '') . "\n";}}Shell(シェルスクリプト)をコマンドプロンプトから実行 [ …