我需要上传一个csv文件并在导入函数上处理它。我有一个代码可以正确上传文件,上传后我很快调用我的导入函数时会发生错误${MQHost}
< / p>
这是我的上传功能
MQHost
这是我在视图文件中的表单
The file "/tmp/phpHYybvQ" does not exist
此错误有什么问题?
我在导入功能中使用了laravel artisan call.Here the artisan call
public function postUpload ()
{
if (Input::hasFile('load_file')){
$file = Input::file('load_file');
$name = time() . '-' . $file->getClientOriginalName();
//check out the edit content on bottom of my answer for details on $storage
$storage = public_path();
$path = $storage . '/lang';
// Moves file to folder on server
$upladed= $file->move($path, $name);
$langfile = $upladed->getPathname();
if ($langfile)
return $this->import($path,$langfile);
}
}
我正在使用此套餐:https://packagist.org/packages/tlr/laravel-lang-tools