我正在创建一个目录,然后将上传的文件移动到其中,但它给了我这个警告
Warning: move_uploaded_file(): The second argument to copy() function cannot be a directory in G:\xampp\htdocs\product_management\admin\process\process_product.php on line 43
Warning: move_uploaded_file(): Unable to move 'G:\xampp\tmp\phpE5B0.tmp' to '../product_images/10/thumb' in G:\xampp\htdocs\product_management\admin\process\process_product.php on line 43
我的代码是
if($_FILES['thumb']['name']!=="") {
echo $path = "../product_images/".$insert_id."/thumb";
mkdir($path,0777, true);
move_uploaded_file($_FILES['thumb']['tmp_name'],$path);
}
exit;