472,794 Members | 3,001 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 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 3878
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.