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

WBOY
Release: 2016-06-23 14:14:33
Original
768 people have browsed it

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;"/>   
Copy after login


然后下面这个是判断客户端的
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){}}
Copy after login

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template