我想将两个文件从python脚本传递到laravel artisan命令,即我的python脚本:
import subprocess
file1 = 'C:\\Users\\MyFolder\\Mybook.pdf';
file2 = 'C:\\Users\\MyFolder\\Myaudio.mp3';
subprocess.call("php C:\\xampp\\htdocs\\project\\artisan zip " + file1 +' '+ file2 )
我的命令类:
<?php
class ZipFiles extends Command
{
protected $signature = 'zip {file1} {file2}';
protected $description = 'zip files';
public function handle()
{
Log::info($this->argument('file1'));
Log::info($this->argument('file2'));
}
}
但我得到了这个错误:
Too many arguments to "zip" command, expected arguments "file1" "file2".
目前没有回答
相关问题 更多 >
编程相关推荐