0

I try to do a simple upload file and I want to fix the upload directory to upload the file but I’ve tried many ways to do it and I got this error : failed to open stream.

I’ve tried like this '/html5unchained/imgs/'and this C:/wamp/www/html5unchained/imgs/and this C://wamp//www//html5unchained//imgs//

$uploaddir = 'C:\wamp\www\html5unchained\imgs';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

move_uploaded_file($uploadfile, $uploaddir);

i've tried all the posiblities any help please

Karthick Kumar
  • 2,349
  • 1
  • 17
  • 30
karim karim
  • 81
  • 1
  • 1
  • 11

1 Answers1

0

The location for the uploaded files on the server can be configured with upload_tmp_dir configuration option..

Avinash Babu
  • 6,171
  • 3
  • 21
  • 26
  • i want to do a temporary one – karim karim Jul 25 '14 at 10:46
  • you need to check upload_tmp_dir,post_max_size,open_basedir configurations are configures properly ..check this out http://stackoverflow.com/questions/12531408/setting-php-tmp-dir-php-upload-not-working – Avinash Babu Jul 25 '14 at 10:49