简体   繁体   English

移动网络服务不起作用

[英]mobile web service does not work

I'm building a site using Yii framework ,website has been developed to working in browsers PC and to run it using mobile browser .i will now put you in the scope . 我正在使用Yii框架构建站点,该站点已开发为可在PC浏览器中运行,并可以使用移动浏览器运行。i现在将您置于范围之内。

  • i made a webservice which bring the text of the message from the sms table in my database . 我做了一个网络服务,将短信文本从数据库的sms表中带出。 here is the webservice : 这是网络服务:

mobile.php: mobile.php:

   getSMS( function(jsonResponse) {

    var msg = JSON.parse(jsonResponse);

    document.getElementById('term').value=(msg[hold-1]['text']);


   }); 

also there is the soap.js file and webservice.php but there is no need to give you the 也有soap.js文件和webservice.php,但没有必要给您
code. 码。 this web service has been tested and successfully working . 该Web服务已经过测试,可以成功运行。 if you open the website using PC browser like chrome ,its working , but if you open the page using mobile browser (it does not work). 如果您使用chrome之类的PC浏览器打开网站,则该网站可以正常运行,但是如果您使用移动浏览器打开该页面(该网站不起作用)。

don't misunderstand it , i don't need code , look for my question first : 不要误会它,我不需要代码,请先查找我的问题:

my question is : is there any difference if you run a webservice (in general) between mobile browser or PC browser ? 我的问题是:如果在移动浏览器或PC浏览器之间运行Web服务(通常),会有什么区别? if yes give me reasons ? 如果可以,请给我原因吗?

In generally - no (if it the newest mobile browsers on iOS or Android - their must compatible all new technologies: HTML5, WebSockets and other). 一般而言-否(如果是iOS或Android上最新的移动浏览器,则它们必须兼容所有新技术:HTML5,WebSocket和其他)。 I don't what compatible Symbian standart browser 我没有兼容的Symbian标准浏览器

I found (but don't learning) some mini research in http://www.quirksmode.org/m/table.html . 我在http://www.quirksmode.org/m/table.html中找到了(但没有学习)一些小型研究。 The main difference is UserAgent of mobile browsers, here its' list http://www.useragentstring.com/pages/Mobile%20Browserlist/ . 主要区别在于移动浏览器的UserAgent ,此处是其列表http://www.useragentstring.com/pages/Mobile%20Browserlist/ In order of user agent the website knew what version of site (mobile or desktop) show. 网站按照用户代理的顺序知道显示的是哪个版本的网站(移动或台式机)。

For cleary testing you may set on Chrome (for example) manual user agent one of the mobile browser ( here one of examples) 为了进行清晰的测试,您可以在Chrome(例如)上设置手动用户代理(移动浏览器之一)( 此处为示例之一)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM