Re: Upload image file

From: Date: Fri, 01 Nov 2002 21:51:34 +0000
Subject: Re: Upload image file
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16681@lists.php.net to get a copy of this message
Thanks for your reply, it works fine if i upload one image, but if attempt upload another image (with a defferent name) to the same directory it uploads half or less than half of the image, have you got any iedas why this is happening? "John Asendorf" <JAsendorf@lcounty.com> wrote in message news:8A1B14582FF6D511A5DF00B0D0220374B49C79@exchange.lcounty.com... > Throw some debugging echoes in there to show you what the file names and > directories are looking like. > > --------------------- > John Asendorf - jasendorf@lcounty.com > Web Applications Developer > http://www.lcounty.com - NEW FEATURES ADDED DAILY! > Licking County, Ohio, USA > 740-349-3631 > Nullum magnum ingenium sine mixtura dementiae fuit > > > > -----Original Message----- > > From: Shaun Thornburgh [mailto:shaun@mania.plus.com] > > Sent: Friday, November 01, 2002 4:38 PM > > To: php-windows@lists.php.net > > Subject: [PHP-WIN] Upload image file > > > > > > I am attempting to upload image files to the server from a > > users browser > > using the following code, however, the images seem to get > > corrupted, they > > look completely different and the file sizes are generally > > smaller, also it > > sometimes says file upload unsuccessful, even when it does > > upload the file? > > > > Any ideas? > > > > Thank you > > > > //copy image to server > > if ($image != "none") { > > if (copy ($image, $dir.$image_name)){ > > echo "<p>File upload successful!</p>"; > > } else { > > echo "<p>File upload unsuccessful!</p>"; > > } > > > > //new name of image > > $new_name = "$property_id-$category_id-$sub_category_id.jpg"; > > > > //rename the file > > rename($dir.$image_name, $dir.$new_name); > > } > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#16681) next »