$ref_id = mysql_insert_id();
$locatie = 'iso_photo/afwijkingen';
if($_FILES['uploaded']['type'] != 'application/octet-stream') // Geen php files
{
$folder = $locatie.basename($_FILES['uploaded'][$ref_id.'.jpg']) ;
move_uploaded_file($_FILES['uploaded']['tmp_name'], $folder);
}
给出: 警告:move_uploaded_file(iso_photo / afwijkingen)[function.move-uploaded-file]:无法打开流:是目录
警告:move_uploaded_file()[function.move-uploaded-file]:无法将'/ tmp / php6LQCqY'移动到'iso_photo / afwijkingen'
可能出现什么问题?
答案 0 :(得分:1)
编辑第4行,现在应该工作
$locatie = 'iso_photo/afwijkingen';
if($_FILES['uploaded']['type'] != 'application/octet-stream') // Geen php files
{
$folder = $locatie . "/" . basename($_FILES['uploaded'][$ref_id]) ;
move_uploaded_file($_FILES['uploaded']['tmp_name'], $folder);
}
但不能正确说,因为我不知道$ref_id
变量的内容