这似乎很荒谬,但我一直在从我的网站内链接到index.php以外的任何页面时遇到错误。例如,
<p>No thanks, return to the <a href="index.php">home page</a>.</p>
完全正常,并在点击时加载http://example.com/index.php
页面。但是,两者都
<p>No thanks, return to the <a href="thankyou.php">home page</a>.</p>
和
<p>No thanks, return to the <a href="http://example.com/thankyou.php">home page</a>.</p>
单击时会导致错误*,即使我可以直接在浏览器地址栏中输入地址http://example.com/thankyou.php
,也可以完美加载。
*错误消息为:
Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( ID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(ID), timestamp int NOT NU' at line 1
答案 0 :(得分:1)
您应该检查您是否在thankyou.php脚本或thankyou.php包含或要求的任何脚本中创建表。