【问题标题】:Error in uploading file to a server using Phonegap file transfer使用 Phonegap 文件传输将文件上传到服务器时出错
【发布时间】:2013-10-05 21:51:53
【问题描述】:

我正在使用 phonegap 将文件上传到服务器。我正在制作 android 应用程序,它可以拍照并发送到服务器。我收到错误

“响应解析错误语法错误,此行中出现意外的 T_STRING”

我也在贴代码

这是我的 phonegap 代码。

 navigator.camera.getPicture( cameraSuccess, cameraError, {
                        quality : 75,
                        destinationType : Camera.DestinationType.FILE_URI,
                        sourceType : Camera.PictureSourceType.PHOTOLIBRARY,
                        mediaType: navigator.camera.MediaType.ALLMEDIA,
                        allowEdit : true,
                        targetWidth: 100,
                        targetHeight: 100
                    });

move_uploaded_file($_FILES['file']['tmp_name'],'/TeleNoc Sites Images/'.basename($_FILES['file']['name']));

这是我在服务器上捕获文件的上传脚本

【问题讨论】:

    标签: android file file-upload cordova file-transfer


    【解决方案1】:

    出现“unexpected T_STRING”错误的一个常见原因是前一行中缺少分号。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-10
      • 1970-01-01
      • 1970-01-01
      • 2017-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多