473,770 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in uploading files

28 New Member
Iam uploading some files and images using my code, but the print_r($_FILES ) array is coming null

Iam using PHP Version 4.3.10 and i have enabled file uploading options in my server ie file_uploads is set on in my php.ini

This is my code

<?php
print_r($_FILES );
?>

<form name="frmImg" method="post" enctype="multip art/form-data">
<input type="File" name="assetUplo ad">
<input type="submit">
</form>

Can anyone help me in spotting out the issue
Sep 30 '06 #1
5 1438
ronverdonk
4,258 Recognized Expert Specialist
Where is your
[HTML]<input type="hidden" name="MAX_FILE_ SIZE" value="xxxxxx"> [/HTML]
statement?
Sep 30 '06 #2
raji20
28 New Member
Where is your
[HTML]<input type="hidden" name="MAX_FILE_ SIZE" value="xxxxxx"> [/HTML]
statement?

I tried using this statement also, but the FILES array is empty.

<input type="hidden" name="MAX_FILE_ SIZE" value="xxxxxx">
Oct 2 '06 #3
ronverdonk
4,258 Recognized Expert Specialist
You'd better post the code you have (WITHIN [code] TAGS!) then we can all have a look at it and try to figure out what is wrong.

Ronald :cool:
Oct 2 '06 #4
raji20
28 New Member
This is the code iam using,
Expand|Select|Wrap|Line Numbers
  1. <?php if(isset($_POST["test"])){
  2.      print_r($_FILES);
  3. }
  4. ?>
  5.  
  6. <form name="frmImg" method="post" enctype="multipart/form-data">
  7. <input type="File" name="assetUpload">
  8. <input type="submit" name="test">
  9. </form>
the php.ini settings is
file_uploads On
upload_max_file size 2M
Oct 2 '06 #5
ronverdonk
4,258 Recognized Expert Specialist
Where is your
Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="MAX_FILE_SIZE" value="bytes_to_pass">
statement. It is mandatory!!

Ronald :cool:
Oct 2 '06 #6

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

Similar topics

3
2189
by: Mike Walsh | last post by:
I have a problem uploading files with PHP which has me stumped! I am unable to successfully upload files. My simple test script is as follows: <?php if (count($_FILES)) { var_dump($_FILES) ; }
13
4322
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
4
2154
by: Himanshu | last post by:
hi, Can anybody tell me that thru asp.net using c#, how can we upload and download physical files in any table of SQL Server Database. the uploading part is running successfully but the problem arises in the retriving part of the code. i am not getting that how will i able to download the file which is there in the SQL Server database in the field type "image".
0
1252
by: FusionGuy | last post by:
I've created a file uploading handler, implemented as an httpHandler. Each time I attempt to upload a file, or files, my HttpContext.Request.Files property never contains the files that were uploaded. Here's a snippet of my handler code: // *** BEGIN HANDLER CODE *** // public class AutoUpload : IHttpHandler { public void ProcessRequest(HttpContext context) {
15
4146
by: =?ISO-8859-1?Q?J=F8rn?= Dahl-Stamnes | last post by:
Hello folks, I need some help/advice FAST. I have problems with addslashes on my web-servers. After uploading a file, I read the uploaded file, use addslashes on the read data and then insert it into a blob field in a MySQL database. The problem is that this works fine on my internal test web-server (running under RedHat 7.3). But on my production web-server (running Fedora Core 4)
3
3930
by: dreamznatcher | last post by:
Hello, I found a script here: http://www.webtoolkit.info/ajax-file-upload.html which supposedly allows you to upload files using AJAX (I'm not an expert). The site claims it's the best way to upload files out there, and the file size is only 1 kb. I couldn't get it to work for me. I downloaded the files to my computer, and opened the index file with my browser. It doesn't work (the demo on their site does); IE doesn't show any error...
7
2675
by: jambroo | last post by:
Hello, We are currently having issues uploading files using PHP. It seems files below 8MB are uploaded fine, however files above 8.2MB cause the page to timeout or show a 'Cannot find server or DNS Error' error. I have looked around and read about common problems people have uploading and the solutions they have used have not seemed to help. For this particular page i have increased post_max_size,
2
1486
by: Zoliq | last post by:
Hi, I have a serious problem. I'm currently developing an application in which the user should upload many files (600-700 xml files). I've searched the web for a while and so far I realized that there's no way to use the HtmlInputFile class to achive the desired effect just because I can't set programatically the property of the class that stores the path of the selected file. My first approach was to write some javascript code which would...
2
1388
by: =?Utf-8?B?TmV0YWpp?= | last post by:
Hi Experts We are uploading files on the server using HtmlInputfile control with visual studio 2005, 2.0. In this there is an option for user to keep on uploading the files finally file actually uploaded on the server after clicking Upload Button. So when user add the file we store the content of HTMLInputfile control in session object. This overall functionality is working in visual studio 2002, 1.0 environment but the problem we are...
3
5182
by: muziburrehaman | last post by:
i am looking for code in php to upload the 1 gb files. any one can please help me by sending the code....
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.