file uploading error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Midgard
    New Member
    • Nov 2006
    • 10

    file uploading error

    I have this code:

    [php]
    <?php
    if ($_FILES) {

    echo '<pre>';
    print_r($_FILES );
    echo '</pre>';

    }
    ?>

    <form style="margin: 0px;" method="post" action="file_up load_test.php" enctype="multip art/form-data">
    <div style="margin: 4px;">
    <input type="file" name="Picture1" value="" style="padding: 4px; width: 320px;">
    </div>
    <div style="margin: 4px;">
    <input type="submit" value="Upload!" style="padding: 4px;">
    </div>
    </form>
    [/php]

    I send form, and i have this messages:

    Code:
    Array
    (
    	[Picture1] => Array
    		(
    			[name] => 003.jpg
    			[type] => 
    			[tmp_name] => 
    			[error] => 1
    			[size] => 0
    		)
    )
    size always as 0, why?

    thanks ... (and sorry for my english..)
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Midgard.

    The error field tells you that the file wasn't uploaded b/c it exceeded the upload_max_file size directive in your php.ini file.

    Here's what the error codes mean.

    Here's more info about handling file uploads.

    Comment

    Working...