我有一个上传的文件,当试图将它保存到文件系统时,它只是失败了。
我的var_export($_FILES['bom_file'])
产品
array (
'name' => '_bomUpload.tester.csv',
'type' => 'application/octet-stream',
'tmp_name' => 'C:\\wamp\\tmp\\php837A.tmp',
'error' => 0,
'size' => 265,
)
这是我的move_uploaded_file()
尝试:(我尝试了几个差异文件路径)
$file_path = 'C:/wamp/NetBeansProjects/BomProject/application/uploads/boms/testfile.csv'; // For Testing ---->
$testVar = move_uploaded_file($_FILES['bom_file']['name'], $file_path);
echo ($testVar)? 'The file has been uploaded': 'There was an error uploading the file';
echo '<pre>UPLOAD?: ', var_export($testVar), '</pre>'; // For Testing ---->
我一直收到错误消息并且$testVar
是错误的。
我错过了什么??