0
我試圖發送一個圖片,採取我的應用程序,到我的遠程服務器使用JavaScript和PHP,但到目前爲止,米卡住:我試圖發送wp8上的phonegap圖片,但我得到一個錯誤
這是
function onPhotoDataSuccess(imageData) {
alert(imageData);// returns:"/CapturedImagesCache/WP_20130605_021.jpg"
//send picture to server
var options = new FileUploadOptions();
options.fileKey="file";
options.fileName=imageData.substr(imageData.lastIndexOf('/')+1);
options.mimeType="image/jpeg";
var params = new Object();
params.value1 = "test";
params.value2 = "param";
options.params = params;
var ft = new FileTransfer();
ft.upload(imageData, "http://***.**/app/upload/upload.php", win, fail, options);
alert ("picture will be send");
}
PHP的服務器正在運行從我的應用程序的代碼:
$new_image_name = "YEAH.jpg";
move_uploaded_file($_FILES["file"]["tmp_name"],"/httpdocs/app/upload/images/".$new_image_name);
這是我得到的錯誤:
Log:"Error in error callback: FileTransfer1933815797 = ReferenceError: Invalid left-hand side in assignment"
我真的很希望任何人都有這方面的經驗,因爲這是爲期兩週的學校項目。