|
Posted by Shelly on 07/24/05 17:23
<pfrank26@hotmail.com> wrote in message
news:1122211729.994522.275720@o13g2000cwo.googlegroups.com...
> There are two main types of jpg in the system - jpeg and pjpeg. One
> solution is to use the PHP command getimagesize - see
> http://uk2.php.net/manual/en/function.getimagesize.php . The array it
> returns contains the type of image the supplied file is.
>
I'll try that (in a few weeks), but I am not sure I made myself clear to you
as to what my problem is. Let me clarify.
I use type=file in the html description of the field with a name of
name=filename. Then when I check the type from that one of the images is
"image" for the first five characters of the type, but the other is blank.
They are both jpg extensions. What I use is $_FILES['filename']['type'],
the global variable filled in by the file type textbox using the browse
button supplied.
Now from reading the documentation it seems to me that getimagesize() is a
server-side function to get the details on a file that is on the server. I
do the testing before actually uploading the file. This is standard
procedure. If the file is not of the proper type, the upload is not done.
Dos the getimagesize() work on a file on the user's system? I would think
not because that would allow the server to browse the user's system
indiscriminately, rather than merely looking at the supplied file -- a major
privacy breach.
Shelly
Navigation:
[Reply to this message]
|