$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);
}
Gives: Warning: move_uploaded_file(iso_photo/afwijkingen) [function.move-uploaded-file]: failed to open stream: Is a directory
Warning: move_uploaded_file() [function.move-uploaded-file开发者_如何学Go]: Unable to move '/tmp/php6LQCqY' to 'iso_photo/afwijkingen'
What might be wrong?
edited 4th line, should work now
$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);
}
but can't properly say, as i don't know content of $ref_id
variable
精彩评论