2
我想用角度發送文件名和文件路徑到php服務器。 我的代碼如下所示:使用角度發送http發送請求到許多數據的php
$http({
method: 'POST',
url: 'sample.php',
data: "files=" + $scope.files,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(function(data) {
$scope.data = data;
});
};
在$scope.files
存儲我的文件名,例如
FILE1.TXT,
FILE2.TXT,
file3.txt
我想發一個其他參數($scope.source)
其中存儲服務器上的文件路徑例如
files/textfiles /。