Problem in uploading files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raji20
    New Member
    • Aug 2006
    • 28

    #1

    Problem in uploading files

    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
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Where is your
    [HTML]<input type="hidden" name="MAX_FILE_ SIZE" value="xxxxxx"> [/HTML]
    statement?

    Comment

    • raji20
      New Member
      • Aug 2006
      • 28

      #3
      Originally posted by ronverdonk
      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">

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        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:

        Comment

        • raji20
          New Member
          • Aug 2006
          • 28

          #5
          This is the code iam using,
          Code:
          <?php if(isset($_POST["test"])){
               print_r($_FILES);
          }
          ?>
          
          <form name="frmImg" method="post" enctype="multipart/form-data">
          <input type="File" name="assetUpload">
          <input type="submit" name="test">
          </form>
          the php.ini settings is
          file_uploads On
          upload_max_file size 2M

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            Where is your
            Code:
            <input type="hidden" name="MAX_FILE_SIZE" value="bytes_to_pass">
            statement. It is mandatory!!

            Ronald :cool:

            Comment

            Working...