T_CONSTANT_ENCAPSED_STRING 阻止 ip
这是第 37 行;
$write = mysql_query("INSERT INTO `trial' VALUES (" '', '".$ip."', '1' ") or die(mysql_error());
错误可能来自更上层..但我不太确定:S
我正在尝试阻止 a 的 ip
Here is line 37;
$write = mysql_query("INSERT INTO `trial' VALUES (" '', '".$ip."', '1' ") or die(mysql_error());
The error may be coming from further up.. But I'm not quite sure :S
I am trying to block the ip of a
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你这里引用的是错误的:
You have a wrong quote here:
您在 VALUES() 内有一些未转义的“。并且审判引用错误。(如 codaddict 提到的)
You have some " inside the VALUES() that are not escaped. And trial is quoted wrong. (as codaddict mentioned)
同一行代码中同时存在 PHP 和 SQL 语法错误。
您错误地引用了表名,在
VALUES
表达式中放错了双引号,在or die
语句中放错了括号。这是固定的语句:(另外,是的,我确实抛出了
mysql_real_escape_string()
以防您没有转义查询变量。)There are both PHP and SQL syntax errors in the same line of code.
You incorrectly quoted your table name, have misplaced double quotes in your
VALUES
expression and have misplaced parentheses in youror die
statement. Here's the fixed statement:(Additionally, yes, I did throw in that
mysql_real_escape_string()
in case you didn't escape your query variables.)