-
Recent Posts
Recent Comments
- 店小二 on 论三座大山
- L on SVI模型拟合
- acnkid on 俄乌战争的回顾及其他
- acnkid on 外卖小哥的收入以及其他
- acnkid on 外卖小哥的收入以及其他
Archives
- June 2024
- April 2024
- January 2024
- October 2023
- September 2023
- August 2023
- June 2023
- May 2023
- February 2023
- January 2023
- October 2022
- September 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- December 2021
- October 2021
- September 2021
- August 2021
- June 2021
- May 2021
- April 2021
- January 2021
- December 2020
- September 2020
- August 2020
- May 2020
- April 2020
- May 2019
- March 2019
- February 2019
- January 2019
- September 2018
- July 2018
- May 2018
- April 2018
- December 2017
- November 2017
- August 2017
- July 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- September 2016
- August 2016
- July 2016
- June 2016
- March 2016
- January 2016
- October 2015
- July 2015
- May 2015
- November 2014
- August 2014
- July 2014
- March 2014
- February 2014
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- March 2013
- January 2013
- December 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- June 2010
- May 2010
- October 2009
- July 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- April 2008
- November 2007
- April 2007
Categories
Meta
Category Archives: 技术相关
关于手机页面的跳转问题
emlog的默认主题提供了一个手机页面,但是在/m的目录下面,访问的时候需要在博客地址后面加上/m,并不是自动跳转的。其实自动跳转实现起来也很容易,国外一个博客提供了跳转函数,我们稍加修改即可使用。 http://detectmobilebrowsers.mobi/ 这个网站上有详细说明,不过是英文的,我简单说下自己是怎么做的,首先将函数文件mobile_device_detect.php传到根目录下面,然后再修改index.php。在前面(You need to include the file with the function then call the function before your PHP pages do anything else)加上 require_once('mobile_device_detect.php'); mobile_device_detect(true,false,true,true,true,true,true,'http://laofish.6te.net/blog/m/',false); ?> 第一个地址就是手机将会浏览的地址,第二个是桌面浏览器不跳转,前面的true和false是针对iPhone,ipad之类浏览器可以跳转到不同的地址,我这里只是简单弄一下,原文上可以进行详细的配置。下面就是挑战的文件。