Re: Image upload

From: Date: Tue, 06 Feb 2007 00:04:33 +0000
Subject: Re: Image upload
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-248397@lists.php.net to get a copy of this message
PS I forgot that the $_FILES array also has an 'error' field in it. Check that! On Mon, February 5, 2007 4:29 pm, Robert Fitzpatrick wrote: > I have a small application that ran on one server and now gives me a > problem with uploading images on a new server. I am running PHP 4.4.4 > now on this server and hoping it is just something that needs adjusted > in php.ini, but cannot seem to find. The file is posted as a file > fields > in a multipart/form-data form, the application tests the file with > getimagesize() shown below. I am getting the die response in the > browser. I tried echo of the file and it prints a random file name > under > the /tmp directory on this CentOS Linux system. If I sleep for 10 > seconds, the file gets created and gone after the script finishes. Can > someone suggest what my problem may be? > > if (!getimagesize($_FILES['filPhoto']['tmp_name'])) { > die('The file you are attempting to upload is not an image file.'); > } else { > <snip> > > -- > Robert > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#248397) next »