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条)

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改