Re: uploading image

From: Date: Thu, 04 Jan 2001 21:49:46 +0000
Subject: Re: uploading image
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32738@lists.php.net to get a copy of this message
Get rid of the @ in front of copy() That is suppressing any error messages. ----- Original Message ----- From: "sarahana" <sarahana@cyberjunkie.com> Newsgroups: php.general Sent: Wednesday, January 03, 2001 4:20 AM Subject: [PHP] uploading image Question 1: My img directory has write attributes, and so does a sub-directory (where the picture needs to be uploaded).. but the pic still won't upload - why?? Question 2: Is there any way to print the error message (like in case of mysql errors).. ?? Here is the script I'm using: $gid = "whatever"; if ($img1_name != "") if($img1_size > 20000) echo "File size is bigger than 20kb!"; exit; } $imga = explode(".", $img1_name); $picname = $gid.$imga[1]; @copy("$img1", "/img/people/$picname"); } else die("No Picture Was Uploaded"); }

« previous php.general (#32738) next »