z则正确连接数据库了为什么使用mysql_real_escape_string 报错。
Warning:mysql_real_escape_string()[function.mysql-real-escape-string]:Accessdeniedfor...
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ''@'localhost' (using password: NO) in E:\xxy\CMS\includes\Tool.class.php on line 40
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in E:\xxy\CMS\includes\Tool.class.php on line 40
方法:
if(!GPC){
return mysql_real_escape_string($_date);
}else{
return $_date;
}
如果我使用
mysql_escape_string 这个就不报错 展开
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in E:\xxy\CMS\includes\Tool.class.php on line 40
方法:
if(!GPC){
return mysql_real_escape_string($_date);
}else{
return $_date;
}
如果我使用
mysql_escape_string 这个就不报错 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询