473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

is_uploaded_file fails...

exoskeleton
104 100+
good day dear experts... i have a problem about is_uploaded_file function.. it alwayz return false..is this function available in PHP version 5.0.1 or only in later version? im using PHP 5.0.1

thank you
Oct 25 '06 #1
6 3907
raji20
28
good day dear experts... i have a problem about is_uploaded_file function.. it alwayz return false..is this function available in PHP version 5.0.1 or only in later version? im using PHP 5.0.1

thank you
is_uploaded_file function is available for ,
(PHP 3 >= 3.0.17, PHP 4 >= 4.0.3, PHP 5)
Oct 26 '06 #2
exoskeleton
104 100+
ah ok.. so do you have an idea why is it alwayz returning false?
here is my form:

<form action="" method="POST">
<input type="file" name="sfile" id="sfile">
<input type="submit" name="submit" value="submit">
</form>

is there someting wrong with my form?

is_uploaded_file function is available for ,
(PHP 3 >= 3.0.17, PHP 4 >= 4.0.3, PHP 5)
Oct 26 '06 #3
raji20
28
I think you forgot to add enctype="multipart/form-data" in the form , thats why you the function always returned false, try this.

<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="sfile" id="sfile">
<input type="submit" name="submit" value="submit">
</form>
Oct 26 '06 #4
exoskeleton
104 100+
ah ok thank you sir...but what's that for? i mean what is the purpose of that enctype?
Oct 26 '06 #5
raji20
28
ah ok thank you sir...but what's that for? i mean what is the purpose of that enctype?

Multipart/Form-data is used when you have an inputfile control in your form, basically it is to facilitate that upload of binary data.


Enctype (encoding type) specifies the media type of the underlying data.
Oct 27 '06 #6
exoskeleton
104 100+
I see.. now its working! thank you very much sir...
more power
Multipart/Form-data is used when you have an inputfile control in your form, basically it is to facilitate that upload of binary data.


Enctype (encoding type) specifies the media type of the underlying data.
Oct 27 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ralph Freshour | last post by:
Is it a good idea to use the is_uploaded_file() function (as a security measure) when I've uploaded a file via Post method? Thanks...
2
by: Ralph Freshour | last post by:
I'm using the is_uploaded_file() function to check if I'm uploading via Http - I am using copy() and when I use the is_uploaded_file() function it returns false - am I using the wrong upload...
6
by: kenneth fleckenstein nielsen | last post by:
Hi guru's It runs ok on my developmaschine, and on the test server that i've set up. but fails after installing on the customers server. I made a XML webservice that does these steps: a) access a...
7
by: SevDer | last post by:
Hi I have a class library that needs to download the HTML in a specific page of ours with provided querystring. When I open this URL with any browser, it loads fine. When I do WebRequest from Web...
1
by: comp.lang.php | last post by:
Consider my code: if ($this->isSuccessful && is_file($_FILES)) { // STEP 6: MOVE RESUME TO DIRECTORY $uuid = $this->sfug->getUUID(); if (!$uuid) $this->sfug->setUUID(); $uuid =...
2
by: Richard Hsu | last post by:
// code #include "stdio.h" int status(FILE * f) { printf("ftell:%d, feof:%s\n", ftell(f), feof(f) != 0 ? "true" : "false"); } int case1() { FILE * f = fopen("c:\\blah", "wb+"); int i = 5;
2
by: Anbu | last post by:
Sorry for cross posting the query. But I need a resolution as early as possible. I have developed an application to authenticate the user based on LDAP Search and authentication. The Windows...
12
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug...
2
by: yord | last post by:
Hello, I have a PHP based site running for 2 years without any problems. The user can upload images and I run the is_uploaded_file() method to check if the file was really uploaded via HTTP...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.