move_uploaded_file($NEWFILE,"./data/$curmember[mid]/$NEWFILE_name");
move_uploaded_file($NEWFILE,"/absolute/path/to/data/$curmember[mid]/$NEWFILE_name");
Is the the temp file there (/tmp/phpQOE2AK)? Try setting the absolute path of your data folder and see what happens.
toPHP:move_uploaded_file($NEWFILE,"./data/$curmember[mid]/$NEWFILE_name");
PHP:move_uploaded_file($NEWFILE,"/absolute/path/to/data/$curmember[mid]/$NEWFILE_name");
/chroot/home/visszasz/joyridercoaching.com/html/data/$curmember[mid]/$NEWFILE_name
<?php echo $_SERVER['DOCUMENT_ROOT']; ?>
/home/visszasz/joyridercoaching.com/html
move_uploaded_file($NEWFILE,"/home/visszasz/joyridercoaching.com/html/data/$curmember[mid]/$NEWFILE_name");
Warning: move_uploaded_file(/home/visszasz/joyridercoaching.com/html/data/19/) [function.move-uploaded-file]: failed to open stream: Is a directory in /chroot/home/visszasz/joyridercoaching.com/html/incs/front/inc/uploadedit.inc.php on line 45
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpqZeu4z' to '/home/visszasz/joyridercoaching.com/html/data/19/' in /chroot/home/visszasz/joyridercoaching.com/html/incs/front/inc/uploadedit.inc.php on line 45
Sorry man, I can't do much debugging from here. But that error means that the move_uploaded_file() function is expecting one of its parameters to be a path to a file and it's finding a directory there instead. It's got to be some sort of error realted to the path. I guess it could be permission related, but I would think the error would be different..![]()
<?PHP
$tmpfile = tempnam("dummy","");
$path = dirname($tmpfile);
echo $path;
unlink($tmpfile);
?>
Clearly its a path issue from what i can get of this limited info over here..this should solve the issue
PHP:<?PHP $tmpfile = tempnam("dummy",""); $path = dirname($tmpfile); echo $path; unlink($tmpfile); ?>
upload this file to your server this will give the path to temporary directory
now store that value in a variable and append the path to the temporary file name..
Thats should solve it
Your $NEWFILE_name seems empty. echo your $NEWFILE_name to see the results.