I'm trying to upload a file but, I getting this error : Could not move the file
.
My code:
$directory = "C:ck";
$fname = pathinfo(Input::file('file')->getClientOriginalName(), PATHINFO_FILENAME);
$fext = Input::file('file')->getClientOriginalExtension();
$fullname = $directory;
Input::file('file')->move($fullname, $fname);
Error:
Could not move the file "C:xampp mpphp6D32.tmp" to "C:ckaaaa" ()
if i put $fullname = $directory . $fname . '.' . $fext;
it create a folder inside ck
with the file name and put the file inside this new folder. But i don't want to create a folder with the file name.
Thank you
See Question&Answers more detail:os