Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何使用submit按钮在angularjs中传递文件? {{oneMore.firstName} 输入登录详细信息 用户名 密码 文件上传数据_Php_Jquery_Angularjs - Fatal编程技术网

Php 如何使用submit按钮在angularjs中传递文件? {{oneMore.firstName} 输入登录详细信息 用户名 密码 文件上传数据

Php 如何使用submit按钮在angularjs中传递文件? {{oneMore.firstName} 输入登录详细信息 用户名 密码 文件上传数据,php,jquery,angularjs,Php,Jquery,Angularjs,在上述代码中。当用户按下提交按钮时,我如何上传文件上传。。选择文件时不应上载该文件。您需要使用如下指令:,它将在客户端提供文件句柄,该示例还提供服务器端api调用的语法。您可以在服务器端获得该文件。它是特定于浏览器的文件api,我看不到AngularJS的任务,sorryYes,对。我已经用过了。但是当提交按钮更改时,没有关于如何上传文件的文档。当我在调用onFileSelect()函数时选择文件,它就会工作。 <div class="divMainContainer" ng-contro

在上述代码中。当用户按下提交按钮时,我如何上传文件上传。。选择文件时不应上载该文件。

您需要使用如下指令:,它将在客户端提供文件句柄,该示例还提供服务器端api调用的语法。

您可以在服务器端获得该文件。它是特定于浏览器的文件api,我看不到AngularJS的任务,sorryYes,对。我已经用过了。但是当提交按钮更改时,没有关于如何上传文件的文档。当我在调用onFileSelect()函数时选择文件,它就会工作。
<div class="divMainContainer" ng-controller="loginController">
            <form name="loginForm" ng-submit="loginChecks($files)">
               <table class="imagetable">
                    <tr>                          
                    <td>&nbsp;</td>
                    <td style="color:red;"> {{oneMore.firstName}}</td>
                    </tr>   
                    <tr>
                        <th colspan="2">Enter login detail</th>                            
                    </tr>
                    <tr>
                        <td>User name</td>
                        <td><input type="text" id="txtUserName" ng-model="data.txtName" required></td>                                
                    </tr>
                    <tr>
                        <td>Password</td>
                        <td><input type="password" ng-model="data.txtPassword" required> </td>     
                    </tr>
                    <tr>
                        <td>File upload data</td>
                        <td><input type="file"> </td>     
                    </tr>
                    <tr>                          
                        <td>&nbsp;</td>
                        <td><input type="submit" value="Login"></td>
                    </tr>                         
                </table>  
            </form>             
        </div>