dongqin1167 2015-01-01 11:18
浏览 51
已采纳

Internet Explorer与PHP的奇怪行为

I have a php code list.php working differently on Internet Explorer 9, 10, 11 and chrome.

I'm listing pagination using <a href=$_SERVER[PHP_SELF]?no=$next_list>. In Chrome and IE 11, this code works fine, which means when I click the link I am directed to mydomainname.com/list.php?no=10.

But in IE 9 and 10, I am directed to list.php?no=10 and am encountered by 'page not found' error. In other words, I am directed to a solid 'file name' instead of 'domain address + file name'.

Another behavior I noticed in IE 9 and 10 before I click the pagination link is that the address reads mydomainname.com//list.php.

I've included html5shiv.js and respond.js for IE performances.

Is it something like $_SERVER or PHP_SELF not configured properly for old IE? I would greatly appreciate any help. Thanks!

  • 写回答

2条回答 默认 最新

  • dooo61733 2015-01-01 11:35
    关注

    Try this:

    <a href=/$_SERVER[PHP_SELF]?no=$next_list>
    

    note the "/" - this will bring you always back to root

    Is that what you mean?

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

报告相同问题?

悬赏问题

  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”