Site icon Hip-Hop Website Design and Development

wp_handle_upload specified file failed upload test

The code I am using is practically the same as the codex. The $u and $m return true. Just the $error gives “specified file failed upload test”.
Thanks for any help you can give.

FORM:

PHP

    if ($uploadedfile = $_FILES['amfile']) {$u = "Uploaded file set";} else  {$u = "Uploaded file NOT set";} 

    $upload_overrides = array( 'test_form' => false );

    if ($movefile = wp_handle_upload( $uploadedfile, $upload_overrides )) {$m = "Movefile file set";} else  {$m = "Movefile file NOT set";}  ;

    if ( $movefile && !isset( $movefile['error'] ) ) {
        $error = "File is valid, and was successfully uploaded.n";
        var_dump( $movefile );
    } else {

        $error = $movefile['error'];
    }

    echo $u . "<br>";
    echo $m . "<br>";
    echo $error . "<br>";