您好,登錄后才能下訂單哦!
小編給大家分享一下php和html如何實(shí)現(xiàn)商務(wù)通跳轉(zhuǎn)代碼,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
php商務(wù)通跳轉(zhuǎn)代碼
寫(xiě)一段商務(wù)通跳轉(zhuǎn)代碼,要求:
1)保證打開(kāi)的是http://www.swt.com/LR/chat.aspx?from=LKT33156511
2)保證商務(wù)通中記錄來(lái)源是自己的姓名拼音。
可以使用PHP跳轉(zhuǎn)來(lái)實(shí)現(xiàn),/swt/index.php
代碼如下:
<?php $from = isset($_GET['from'])?$_GET['from']:''; if($from){ header('Location:http://lkt.zoosnet.net/LR/Chatpre.aspx?from=LKT33156511&p='.$from.'&r='.$from.'&e='.$from); }else{ header('Location:http://lkt.zoosnet.net/LR/Chatpre.aspx?from=LKT33156511'); } ?>
使用方法:/swt/?form=zhangsan
======================================================================================
商務(wù)通靜態(tài)頁(yè)面跳轉(zhuǎn)代碼
PHP跳轉(zhuǎn)的方式固然方便,但受服務(wù)器環(huán)境限制,在服務(wù)器不穩(wěn)定時(shí),如果禁用PHP,跳轉(zhuǎn)會(huì)失效。下面是比較不錯(cuò)的靜態(tài)跳轉(zhuǎn)方式:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>正在跳轉(zhuǎn),請(qǐng)稍候...</title> <noscript> <meta http-equiv="refresh" content="0; url=http://lvt.zoosnet.net/LR/Chatpre.aspx?id=LVT1001100" /> </noscript> <script> var hrefstr, pos, parastr, target; target = 'http://lvt.zoosnet.net/LR/Chatpre.aspx?id=LVT1001100'; hrefstr = window.location.href; pos = hrefstr.indexOf("?"); parastr = hrefstr.substring(pos + 1); if (pos > 0) { window.location.href = target + '&' + parastr; } else { window.location.href = target; } </script> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> </head><body> </body> </html>
以上是“php和html如何實(shí)現(xiàn)商務(wù)通跳轉(zhuǎn)代碼”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。