dth54864 2016-12-20 18:41 采纳率: 0%
浏览 88
已采纳

适用于localhost但不适用于实时网站。 未捕获的SyntaxError:位于0的JSON中的意外标记<

Anyone know what this error is indicating?

This script (paypal php virtual terminal) works great testing on localhost, but when I transfer the files to my web server the jquery/json hangs.

index.php:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Function.n.parseJSON (http://www..com/virtualterminal/bower_components/jquery/dist/jquery.min.js:4:5309)
at Object.success (http://www..com/virtualterminal/js/validate.js:80:46)
at j (http://www..com/virtualterminal/bower_components/jquery/dist/jquery.min.js:2:26911)
at Object.fireWith [as resolveWith] (http://www..com/virtualterminal/bower_components/jquery/dist/jquery.min.js:2:27724)
at x (http://www..comvirtualterminal/bower_components/jquery/dist/jquery.min.js:4:11065)
at XMLHttpRequest.<anonymous> (http://www..com/virtualterminal/bower_components/jquery/dist/jquery.min.js:4:14577)n.parseJSON @ jquery.js:7517success @ validate.js:80j @ jquery.js:3094fireWith @ jquery.js:3206x @ jquery.js:8259(anonymous function) @ jquery.js:8600

I'm checking the log files, and it looks like the sandbox payment is processing correctly... the only issue is that the jquery/json is not redirecting to the success page.

  • 写回答

1条回答 默认 最新

  • doushu2699 2016-12-20 18:47
    关注

    Anyone know what this error is indicating?

    The error you got is just because the expected response is not a json but seems to be an xml based page. That could be some html output indicating some error for the processing has been done.

    So, eventually that is an error page, which has some html code written and that's contains < at position 0, which is <!doctype ...>.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧