|
Posted by Mike G. on 10/02/97 11:56
Try starting with the basics... Create a simple upload form and see how
it behaves. I use the following:
<?php
if(!empty($_POST)) {
header('Content-Type: text/plain');
print_r($_FILES);
die();
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"
enctype="multipart/form-data">
<input type="file" name="image" />
<input type="submit" name="submit" value="Get Info" />
</form>
What does the output look like? If it's still not working, consider the
file size of the image being uploaded. Does it exceed the
upload_max_filesize directive in the php.ini? Maybe when you resave it
in your editor, it compresses it down to a smaller size.
MS wrote:
> "Mike" <mike@mjfcadsolutions.co.uk> wrote in message
> news:1156431520.440401.167560@m73g2000cwd.googlegroups.com...
> > I have an upload script which works pretty good.
> >
> > I use it to upload JPG's but I have come accross the following problem.
> >
> > It appears that only certain types of JPG's are being accepted.
> >
> > What I have worked out that if I take an image straight off my digital
> > camera (JPG) and try and upload that, it produces an error. I trap for
> > file types and size and it won't reconise the file type.
> >
> > If I take the same image, open it in my graphic package (corel draw in
> > this case) and save it as a new file, the upload accepts it.
> >
> > Has anyone seen this before?
>
> It Depends what and how your are trapping....
>
> I trap for... Extensions
> gif
> jpeg
> jpg
> png
> and MIME types
> "image/gif"
> "image/jpg"
> "image/png"
> "image/x-png"
> "image/pjpeg"
> "image/pjpeg;"
> "image/jpeg"
Navigation:
[Reply to this message]
|