473,404 Members | 2,174 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,404 software developers and data experts.

Problem with uploading a large size file

Tim
I meet problem on uploading a file with a large file size.
Below is my code, how can I modify in order to be able to upload a
large file successfully ? Thank for your help.

upload.html:
<html>
<body><br><br><center>
<form action="upload.php" method=post enctype="multipart/form-data">
File upload: <input type=file name="userfile">
<input type=submit value="send"><br> </form>
</center></body> </html>
upload.php:
<?
$realname = $HTTP_POST_FILES['userfile']['name'];
print "<br><br>";
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])){
copy($HTTP_POST_FILES['userfile']['tmp_name'],
"/mnt/flash/song/$realname");
echo "Upload Filename: " . $HTTP_POST_FILES['userfile']['name'];
}
else{
echo "Upload not complete";
}
print "<a href='upload.html' target='mainF'>Continue to
upload</a>";
?>
Jul 17 '05 #1
2 2432
On 20 Mar 2004 08:43:31 -0800, ti********@sinaman.com (Tim) wrote:
I meet problem
What problem?
on uploading a file with a large file size.
How large?
Below is my code, how can I modify in order to be able to upload a
large file successfully ? Thank for your help.


http://uk.php.net/features.file-upload

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #2

"Tim" <ti********@sinaman.com> wrote in message
news:e5**************************@posting.google.c om...
I meet problem on uploading a file with a large file size.
Below is my code, how can I modify in order to be able to upload a
large file successfully ? Thank for your help.

<snip>

Check your php.ini and look for something like:
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

If you're having problems with file above 2Mb, that'll be it (since you
haven't restricted upload size through the browser in the form:
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
which is defeatable anyway).

Garp
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Markus Ernst | last post by:
Hi For a CMS admin tool I would like to provide a possibility to upload large files to a directory on the webserver. As HTTP uploads are limited in file size and also not comfortable in...
4
by: laredotornado | last post by:
Hi, I'm using PHP 4 and I am submitting some images in a form with <form name=addProductForm enctype="multipart/form-data" method=post action="add_product_response.php"> <input type=file...
6
by: Chamomile | last post by:
can anyone point me to some straightforward information on file uploading without using an html form? That is, direcly from within a php script. if I know the local path etc. to a particular...
1
by: Jonathan | last post by:
Hi everyone, I have a problem with the file uploading in Asp.Net and I have read a lot on forums on this but never found an answer. Here is the problem: I know Asp.Net maximum Length for...
1
by: David | last post by:
Hello. I can't upload large file with HtmlInputFile control:( Is there any file size limitation in HtmlInputFile control? If yes how can I upload to server large size file? Than you.
1
by: Sheldon Glickler | last post by:
I am having a problem uploading on one system and not on another with very similar code in two different applications. I suspect that it has to do with server settings. Here is the code that...
3
by: kujtim | last post by:
i got html code file name html <html> <head> <title></title> </head> <body>
1
by: =?Utf-8?B?SHVzYW0=?= | last post by:
Hi EveryBody: I posted the following code two days ago when I face problem that my code could not upload large data or to be prices more than 4 MB. The code are : Dim arrayImage As Byte()...
10
by: =?Utf-8?B?RGFu?= | last post by:
I'm using a pure ASP upload script to handle file uploading. We run IIS6 and I'm aware of the AspMaxRequestEntityAllowed variable in the metabase. I upped this to allow the file size maximum and it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.