freelanceprogrammers.org Forum Index » PHP

is_uploaded_file


View user's profile Post To page top
erickandja@... Posted: Tue Apr 26, 2005 3:51 pm


Joined: 26 Apr 2005

Posts: 2
is_uploaded_file
Hello,

I don`t understant why in any case, whith file and whithout file in the
INPUT box the fonction is_uploaded_file is always false. Anyone knows why ?

if (!is_uploaded_file($_FILES[`photoInternaute`][`name`]))
{
$errMessage = "No file uploaded";
}

Kind regards.

Eric
Reply with quote
Send private message
View user's profile Post To page top
tech@... Posted: Wed Apr 27, 2005 3:08 am


Joined: 27 Apr 2005

Posts: 7
is_uploaded_file
Eric Kandja wrote:
>
> Hello,
>
> I don`t understant why in any case, whith file and whithout file in the
> INPUT box the fonction is_uploaded_file is always false. Anyone knows why ?
>
> if (!is_uploaded_file($_FILES[`photoInternaute`][`name`]))
> {
> $errMessage = "No file uploaded";
> }
>

There are three possibilities (array, key, value), and maybe it`s that
you need to take a break from the problem, so check

1) the return from the function is_uploaded_file() to make sure the
function returns an associative array
2) do a print_r($FILE) to see what it actually holds at runtime
Reply with quote
Send private message
View user's profile Post To page top
uthayaa_p Posted: Wed Apr 27, 2005 8:48 am


Joined: 12 Apr 2005

Posts: 19
is_uploaded_file
Hi,

Check your form tag, it needs the following attribute
<form enctype="multipart-formdata">

Regards
uthaya

--- Eric Kandja <erickandja@...> wrote:
>
> Hello,
>
> I don`t understant why in any case, whith file and
> whithout file in the
> INPUT box the fonction is_uploaded_file is always
> false. Anyone knows why ?
>
> if
>
(!is_uploaded_file($_FILES[`photoInternaute`][`name`]))
> {
> $errMessage = "No file uploaded";
> }
>
> Kind regards.
>
> Eric
>
>
>
>
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply with quote
Send private message
View user's profile Post To page top
uthayaa_p Posted: Wed Apr 27, 2005 8:56 am


Joined: 12 Apr 2005

Posts: 19
is_uploaded_file
Sorry
the tag attribute is
<form enctype="multipart/form-data">

--- uthaya kumar <uthayaa_p@...> wrote:
>
> Hi,
>
> Check your form tag, it needs the following
> attribute
> <form enctype="multipart-formdata">
>
> Regards
> uthaya
>
> --- Eric Kandja <erickandja@...> wrote:
> >
> > Hello,
> >
> > I don`t understant why in any case, whith file and
> > whithout file in the
> > INPUT box the fonction is_uploaded_file is always
> > false. Anyone knows why ?
> >
> > if
> >
>
(!is_uploaded_file($_FILES[`photoInternaute`][`name`]))
> > {
> > $errMessage = "No file uploaded";
> > }
> >
> > Kind regards.
> >
> > Eric
> >
> >
> >
> >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply with quote
Send private message
View user's profile Post To page top
bansalakhil3... Posted: Wed Apr 27, 2005 9:40 am


Joined: 21 Apr 2005

Posts: 9
is_uploaded_file
hello,
Thsere is a problem in ur code use temp_name instead of name in the if
argument: This check on the temp_name...
if (!is_uploaded_file($_FILES[`photoInternaute`][`temp_name`]))
{
$errMessage = "No file uploaded";
}


On 4/26/05, Eric Kandja <erickandja@...> wrote:
>
>
> Hello,
>
> I don`t understant why in any case, whith file and whithout file in the
> INPUT box the fonction is_uploaded_file is always false. Anyone knows why
> ?
>
> if (!is_uploaded_file($_FILES[`photoInternaute`][`name`]))
> {
> $errMessage = "No file uploaded";
> }
>
> Kind regards.
>
> Eric
>
>
>
>
>
>
> PHP Data object relational mapping generator -
> http://www.meta-language.net/
>
>
> ------------------------------
> *Yahoo! Groups Links*
>
> - To visit your group on the web, go to:
> http://groups.yahoo.com/group/php-objects/
> - To unsubscribe from this group, send an email to:
>
php-objects-unsubscribe@yahoogroups.com<php-objects-unsubscribe@yahoogroups.com?
subject=Unsubscribe>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>


--
Akhil Bansal


[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help