我正在通过创建一个灯箱自学 JQuery。当我输入以下 URL 时,我的 JQuery 就可以工作:
http://localhost/bookshook/other_projects/zachitemdescription.php?id=21
但是当我输入这个网址时,它不起作用:
http://localhost/bookshook/other_projects/zachitemdescription.php/?id=21
为什么额外的反斜杠会停止 jQuery?
最佳答案
它不仅仅停止 jQuery - 这是对完全不同页面的请求。
第一个 URL 正在调用 zachitemdescription.php
,查询字符串值为 id=21
。
第二个 URL 正在调用 zachitemdescription.php
文件夹 的默认文档,查询字符串值为 id=21
,我'我猜测您的情况不存在。
关于php - 为什么 URL 中的此更改会影响 JQuery?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25308559/