php - Moving uploaded files error -
whats wrong code?
<?php move_uploaded_file($_files['file']['tmp_name']."picture/".$_files['file']['name']); ?> <form action='' method='post' enctype='multipart/form-data'> <input type='file' name='file'> <input type='submit' name='submit' value='upload'> </form> i'm getting error: warning: move_uploaded_file() expects 2 parameters, 1 given in c:\xampp\htdocs\social\profile.php on line 3
see docs. move-uploaded-file function have pass 2 parameters:
string $filename string $destination also, assume have mistake in function. there 2 params, concat them, not separate. use , insteald of . before "/pictures/":
move_uploaded_file($_files['file']['tmp_name'], "picture/".$_files['file']['name']); this work.
Comments
Post a Comment