douzhongpi9734 2018-09-30 23:59
浏览 38

JS + PHP $ _GET ['example']现在不工作了

So I have made a JS system to load pages, into a default div named PageContent, now I am needed to use the PHP $_GET function and it seems that my JS is making it so the URL variables do not get set.

The Pageload.js https://hastebin.com/idazuwovoz.js

The issue is when I add a variable to a URL such as example/pages/email?id=10

and then use $_GET['id'] on that page it is blank and saying it is not set, I need to keep the JS as it is a big part of the site and required, but I also need the PHP $_GET to work, can anyone help me solve this issue, please.

  • 写回答

1条回答 默认 最新

  • drh37116 2018-10-01 01:02
    关注

    Try including

    let newUrl='inc/pages' +url+'.php'; alert(newUrl) ;

    after one of your url.replace lines to see the actual url you are getting

    评论

报告相同问题?

悬赏问题

  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b