打开/include/dedevote.class.php文件,查 找$this->dsql->executenonequery(update `#@__vote` set totalcount='.($this->voteinfos['totalcount']+1).',votenote='.addslashes($items).' where aid='.$this->voteid.');
修改为
$this->dsql->executenonequery(update `#@__vote` set totalcount='.($this->voteinfos['totalcount']+1).',votenote='.mysql_real_escape_string($items).' where aid='.mysql_real_escape_string($this->voteid).');
注:
* addslashes() 是强行加\;
* mysql_real_escape_string() 会判断字符集,但是对php版本有要求;(php 4 >= 4.0.3, php 5)
* mysql_escape_string不考虑连接的当前字符集。(php 4 >= 4.0.3, php 5, 注意:在php5.3中已经弃用这种方法,不推荐使用)
转载请注明出处:http://www.ios100.net/open/dedecms/15830.html
