Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

file upload in php through ajax

<?php

    if ( 0 < $_FILES['file']['error'] ) {
        echo 'Error: ' . $_FILES['file']['error'] . '<br>';
    }
    else {
        move_uploaded_file($_FILES['file']['tmp_name'], 'uploads/' . $_FILES['file']['name']);
    }

?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #upload #php #ajax
ADD COMMENT
Topic
Name
9+8 =