最赞回答 / 慕虎3439775
if($this->data['url']){ $link_start="<a href='".$this->data['url']."' target='_blank'>"; $link_end="</a>"; }else { $link_start=''; $link_end=''; }这样就没问题了吧
2016-11-23
最赞回答 / Lydiar3308665
没用预处理,语句参数相当于把表单提交的数据当参数传递之后拼接成完整语句再查询,在执行的时候执行了别的语句。比如例子中的那个语句,本来是selete * from user where username=[参数1] and password=[参数2],但是拼接了用户传递的参数之后,执行时候是:select * from user where username='' or 1=1 # and password =[参数2],#之后相当于注释了,实际执行的就是select * from user where ...
2016-11-08