Re: Help required... Simple File Upload

From: Date: Mon, 25 Nov 2002 05:37:11 +0000
Subject: Re: Help required... Simple File Upload
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-17102@lists.php.net to get a copy of this message
/* i m now using the following script to upload the file but still it is not working.. I there would've been some permission problem , i have given "full control" permission to the whold directory even the drive there the site is hosted. now the script is generating the following out put which means that the file is uploaded successfully. as the error code is zero, but when i see the uploads directory it is still empty */ $file = $_FILES['userfile']['tmp_name']; print_r($file . "<Br>"); if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { print("[" . $_FILES['userfile']['error'] . "] : is the error code"); copy($file, "/uploads"); //a directory whose name is Uploads on the site root } else { echo "Possible file upload attack. Filename: " . $_FILES['userfile']['name']; } --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now

« previous php.windows (#17102) next »