Home  >  Article  >  Backend Development  >  如果用php做wap网站,那新建的时候协议有什么不同吗?

如果用php做wap网站,那新建的时候协议有什么不同吗?

WBOY
WBOYOriginal
2016-06-23 14:14:33726browse

PHP WAP

新建跟平时做web网站时的php文件有区别吗?

回复讨论(解决方案)

虽然不懂,但是php文件能有啥区别呢,无非就是前台显示调整呗

在头部加上这个。。

<meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=2.0;user-scalable=no;initial-scale=1.4;"/>   


然后下面这个是判断客户端的
function uaredirect(murl){    try {            if(document.getElementById("bdmark") != null){                return;            }            var urlhash = window.location.hash;            if (!urlhash.match("fromapp")){                if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))) {                        location.replace(murl);                }            }        } catch(err){}}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn