注册送现金一元秒提现

  • <tr id='v5ly3'><strong id='v5ly3'></strong><small id='v5ly3'></small><button id='v5ly3'></button><li id='v5ly3'><noscript id='v5ly3'><big id='v5ly3'></big><dt id='v5ly3'></dt></noscript></li></tr><ol id='v5ly3'><option id='v5ly3'><table id='v5ly3'><blockquote id='v5ly3'><tbody id='v5ly3'></tbody></blockquote></table></option></ol><u id='v5ly3'></u><kbd id='v5ly3'><kbd id='v5ly3'></kbd></kbd>

    <code id='v5ly3'><strong id='v5ly3'></strong></code>

    <fieldset id='v5ly3'></fieldset>
          <span id='v5ly3'></span>

              <ins id='v5ly3'></ins>
              <acronym id='v5ly3'><em id='v5ly3'></em><td id='v5ly3'><div id='v5ly3'></div></td></acronym><address id='v5ly3'><big id='v5ly3'><big id='v5ly3'></big><legend id='v5ly3'></legend></big></address>

              <i id='v5ly3'><div id='v5ly3'><ins id='v5ly3'></ins></div></i>
              <i id='v5ly3'></i>
            1. <dl id='v5ly3'></dl>

                1. <form id='8304f'></form>
                    <bdo id='8304f'><sup id='8304f'><div id='8304f'><bdo id='8304f'></bdo></div></sup></bdo>

                      • <tr id='oj5x5'><strong id='oj5x5'></strong><small id='oj5x5'></small><button id='oj5x5'></button><li id='oj5x5'><noscript id='oj5x5'><big id='oj5x5'></big><dt id='oj5x5'></dt></noscript></li></tr><ol id='oj5x5'><option id='oj5x5'><table id='oj5x5'><blockquote id='oj5x5'><tbody id='oj5x5'></tbody></blockquote></table></option></ol><u id='oj5x5'></u><kbd id='oj5x5'><kbd id='oj5x5'></kbd></kbd>

                        <code id='oj5x5'><strong id='oj5x5'></strong></code>

                        <fieldset id='oj5x5'></fieldset>
                              <span id='oj5x5'></span>

                                  <ins id='oj5x5'></ins>
                                  <acronym id='oj5x5'><em id='oj5x5'></em><td id='oj5x5'><div id='oj5x5'></div></td></acronym><address id='oj5x5'><big id='oj5x5'><big id='oj5x5'></big><legend id='oj5x5'></legend></big></address>

                                  <i id='oj5x5'><div id='oj5x5'><ins id='oj5x5'></ins></div></i>
                                  <i id='oj5x5'></i>
                                1. <dl id='oj5x5'></dl>
                                  1. 当前位置:首页 > PHP源码 > 列表

                                    php+ajax+h5实现图片上传功能

                                    发布:smiling 来源: PHP粉丝网  添加日期:2017-11-02 20:23:52 浏览: 评论:0 

                                    注册送现金一元秒提现BENWENSHILIWEIDAJIAFENXIANGLEphpSHIXIANajaxTUPIANSHANGCHUANDEJUTIDAIMA,GONGDAJIACANKAO,JUTINEIRONGRUXIA.

                                    htmlYEMIANDAIMA:

                                    1. <!DOCTYPE html> 
                                    2. <html lang="en"> 
                                    3. <head> 
                                    4.   <meta charset="UTF-8"> 
                                    5.   <title>Title</title> 
                                    6.   <script type="text/javascript" src="__PUBLIC__/home/js/jquery-1.11.0.js"></script> 
                                    7.   
                                    8. </head> 
                                    9. <body> 
                                    10. <form class="form-horizontal" role="form" id="myForm" 
                                    11.    action="/index/fileupsend" method="post" 
                                    12.    enctype="multipart/form-data"> 
                                    13.   
                                    14.   选择文件:<input type="file" id="file1" /><br /> 
                                    15.   <input type="button" id="upload" value="上传" /> 
                                    16.   <span id="imgWait"></span> 
                                    17. </form> 
                                    18. <script> 
                                    19.   $(function () { 
                                    20.     $("#upload").click(function () { 
                                    21.       $("#imgWait").html("上传中"); 
                                    22.       var formData = new FormData(); 
                                    23.       formData.append("myfile", document.getElementById("file1").files[0]); 
                                    24.       $.ajax({ 
                                    25.         url: "/Home/index/fileupsend", 
                                    26.         type: "POST", 
                                    27.         data: formData, 
                                    28.         /** 
                                    29.          *必须false才会自动加上正确的Content-Type 
                                    30.          */ 
                                    31.         contentType: false, 
                                    32.         /** 
                                    33.          * 必须false才会避开jQuery对 formdata 的默认处理 
                                    34.          * XMLHttpRequest会对 formdata 进行正确的处理 
                                    35.          */ 
                                    36.         processData: false, 
                                    37.         success: function (data) { 
                                    38.           if(data){ 
                                    39.             alert("上传成功!"); 
                                    40.           } 
                                    41.           $("#imgWait").html("上传成功"); 
                                    42.   
                                    43.         }, 
                                    44.         error: function () { 
                                    45.           alert("上传失败!"); 
                                    46.           $("#imgWait").hide(); 
                                    47.         } 
                                    48.       }); 
                                    49.     }); 
                                    50.   }); 
                                    51. </script> 
                                    52. </body> 
                                    53. </html> 

                                    phpDAIMA:

                                    1. public function fileupsend(){ 
                                    2.   $type_pic = $this->file_upload('1',array('jpg''gif''png''jpeg'),'filetest','myfile'); 
                                    3.   echo $type_pic['img_path']; 
                                    4.   

                                    Tags: php+ajax+h5 图片上传

                                    分享到:

                                    注册送现金一元秒提现相关的文章

                                    靠谱的棋牌---首页_Welcome 蓝洞棋牌官网送3金币---首页_Welcome 百灵拼三张-Welcome 聚友棋牌官网下载安装-首页 百胜棋牌---首页_欢迎您