dongshang6790 2014-05-22 02:55
浏览 34
已采纳

使用PHP框架显示移动与桌面网站

Out of curiosity, is it possible to use MVC (PHP, proprietary framework) to display mobile sites to mobile users and desktop sites to desktop users by rendering different pages?

For example, if I detect mobile devices in PHP and use my controller to render mobile.home.php instead of desktop.home.php, is this bad programming practice? I've attempted to design responsive sites with media queries but I'm not much of a design guy.

What's wrong with this implementation?

  • 写回答

2条回答 默认 最新

  • dsdeeaquu38538545 2014-05-22 03:16
    关注

    Perhaps, Adaptive Rendering can help you.

    Read here: http://msdn.microsoft.com/en-us/magazine/hh975347.aspx

    or watch the video from Channel9 by Phil Haack http://channel9.msdn.com/events/Build/BUILD2011/TOOL-803T

    Hope this helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分