Re: File Upload and NT...

From: Date: Fri, 24 Aug 2001 16:24:47 +0000
Subject: Re: File Upload and NT...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64286@lists.php.net to get a copy of this message
Actually, The warning is coming from when I try and upload the file from the desktop of my Mac. It's supposed to get uploaded into: C:\WINNT\PHP\UPLOADTEMP. I checked phpinfo() and that's where it says the upload_tmp_dir is. By the way, I was using the getimagesize to check if the file is a .gif, .jpg, etc. Even without the getimagesize(), the file still isn't being uploaded into the temp folder. I'm using, basically, the same function that I use on Unix systems. Is there something magic about doing uploads on windows that I don't know about? Thanks, Joe "Erik H. Mathy" wrote: > > > I'm having an odd problem on a WinNT system. > > That's what NT is all about. ;) > > > When I try to do my upload, I test the file to see the type of it: > > $image_info = GetImageSize($the_image); > > Out of curiousity, who don't you try using: > > if(is_file($the_image)) { > do something... > } else { > kick out no file warning... > } > > Docs: > http://www.php.net/manual/en/function.is-file.php > > > However, that line gives me: > > Warning: getimagesize: Unable to open > > '/Joe1/Desktop%20Folder/device_eval.gif' for reading. in > > D:\public\HJ\www.h-jenterprises.com\test\admin\item_functions.php on > > line 22 > > Have you specifically sent the uploaded file there? If not, it's more than > likely in whatever temporary upload folder you have defined in your php.ini > file. > > > At first I had thought this would be a permissions issue, but the file > > it can't open is the one being uploaded. If I echo the file being > > uploaded, i get: > > Image Name: /Joe1/Desktop%20Folder/device_eval.gif > > Oh! OK, I get it...you're tossing it up onto your desktop. So that path > isn't correct. It should be: > > C:\WINNT\Profiles\Joe1\Desktop\device_eval.gif > > In general, you're better off placing that file someplace other than the > desktop. Make a folder somewhere nice and generic, like D:\Uploads\Images\ . > That'll make your life a whole lot easier. > > Hope this helps, drop me a line if it doesn't... > - Erik > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#64286) next »