大佬教程收集整理的这篇文章主要介绍了php – 使用预准备语句时“不允许属性访问”警告,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
... $key = 'd0gis=SUPER-cute'; $sql = "SELECT * FROM `users2` WHERE username = ? AND pwd = AES_ENCRYPT(?,?)"; $stmt = $conn->stmt_init(); $stmt->prepare($sql); $stmt->bind_param('sss',$username,$password,$key); $stmt->execute(); $stmt->store_result(); ...
当调试器遇到第8行或$stmt-> prepare($sql);时,来自xdebug的6个相同的警告表说:
$stmt中的error属性为空,我没有真正的问题,但我只是想知道是什么原因导致出现此警告消息.
> UPDATE query with prepared statements@H_403_14@> http://php.net/manual/en/mysqli-stmt.param-count.php
mysqli::$connect_error
,这对于某些@L_696_14@版本是破坏的:
请参阅mysqli::__construct()
文档中的连接锅炉板:
$MysqLi = new MysqLi('localhost','my_user','my_password','my_db'); /* * This is the "official" OO way to do it,* BUT $connect_error was broken until @L_696_14@ 5.2.9 and 5.3.0. */ if ($MysqLi->connect_error) { die('Connect Error (' . $MysqLi->connect_errno . ') ' . $MysqLi->connect_error); } /* * Use this instead of $connect_error if you need to ensure * compatibility with @L_696_14@ versions prior to 5.2.9 and 5.3.0. */ if (MysqLi_connect_error()) { die('Connect Error (' . MysqLi_connect_errno() . ') ' . MysqLi_connect_error()); }
以上是大佬教程为你收集整理的php – 使用预准备语句时“不允许属性访问”警告全部内容,希望文章能够帮你解决php – 使用预准备语句时“不允许属性访问”警告所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。