RE: [PHP] File Upload and NT...
| From: | Erik H. Mathy | Date: | Fri, 24 Aug 2001 15:54:19 +0000 |
| Subject: | RE: [PHP] File Upload and NT... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64281@lists.php.net to get a copy of this message | ||
> 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