Nope it didn't work :(
| From: | Deadsam | Date: | Mon, 29 Jul 2002 03:15:48 +0000 |
| Subject: | Nope it didn't work :( | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110083@lists.php.net to get a copy of this message | ||
I've been trying a few things that should actually work and for some strange
reason they aren't. It's a strange one indeed. jpg is not a MIME type though
(just thought I'd let you know that) but nevertheless it should work, but
for some weird reason it isn't.
I'll keep plugging away at it till I figure it out.
Thanks Anyhow
Deadsam
if you come up with another method please let me know :)
"Oscar F" <lists@webdevfm.com> wrote in message
news:002001c23684$fc68ba20$bc00a8c0@320jupiter...
> deadsman,
>
> if (($filename_type != "image/jpeg") && ($filename_type !=
> "image/jpg") &&
> ($filename_type != "image/pjpeg")) {
> header("Location:submitError.php"); exit; //goes to an error page if the
> file wasnt a jpg
> } else {
> $upload_path = "/path/of/the/$filename_name";
> if (is_uploaded_file($filename)) {
> Exec("cp $filename $upload_path");
> } else {
> //do whatever if it wasnt uploaded
> }
>
> The "file" formfield, is called filename.. just in case... if you call it
> myFile, you'd have to replace $filename with that.
>
> Hope this helps.
>
> Oscar.-
>
> ----- Original Message -----
> From: "Deadsam" <deadsam@sympatico.ca>
> To: <php-general@lists.php.net>
> Sent: Sunday, July 28, 2002 5:53 PM
> Subject: [PHP] need help with uploading images
>
>
> > I'm trying to get an uploader to work, where you check to make sure it's
a
> > jpeg file that's being uploaded, and no other files allowed. the server
is
> > unix linux using php4.1
> > Any help would be appreciated.
> > thanks in advance
> > deasdam
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>