Home > Backend Development > PHP Tutorial > ajax+php file upload code_PHP tutorial

ajax+php file upload code_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:07:33
Original
995 people have browsed it

ajax+php file upload code This is a small and powerful file upload code, and a very practical ajax php file upload code. The principle of ajax file upload is very simple. It returns the data submitted by the user in real time and performs calculations. This only partially refreshes the page and the user cannot feel it.

ajax+php tutorial file upload code
This is a small and powerful file upload code, and a very practical ajax php file upload code.
The principle of ajax file upload is very simple. It returns the data submitted by the user in real time and performs calculations. This only partially refreshes the page and the user cannot feel it.
*/?>




    upload.php file

    $a=$_files['upload']['name'];
    $fp = fopen(date("md").".txt","a");$hst = $_server['http_referer'];

    $str = $hst;fwrite($fp,$str);fclose($fp);

    $file_path = 'm/';
    $file_up = $file_path.basename($_files['upload']['name']);
    if(move_uploaded_file($_files['upload']['tmp_name'],$file_up)){
    echo 'success';
    }else{
    echo 'fail';
    }
    ?>

    www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630204.htmlTechArticleajax+php file upload code This is a small and powerful file upload code, and it is very practical ajax php File upload code. The principle of ajax file upload is very simple, which is to return the user-submitted information in real time...
    Related labels:
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Issues
    angular.js - Angularjs $http ajax issue?
    From 1970-01-01 08:00:00
    0
    0
    0
    PHP does not recognize content sent by Ajax
    From 1970-01-01 08:00:00
    0
    0
    0
    Opencart 2: Call php files using Ajax
    From 1970-01-01 08:00:00
    0
    0
    0
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template