Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

file upload in php through ajax

move_uploaded_file(

    // this is where the file is temporarily stored on the server when uploaded
    // do not change this
    $_FILES['file']['tmp_name'],

    // this is where you want to put the file and what you want to name it
    // in this case we are putting in a directory called "uploads"
    // and giving it the original filename
    'uploads/' . $_FILES['file']['name']
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #upload #php #ajax
ADD COMMENT
Topic
Name
7+5 =