这段代码昨天工作正常,今天突然开始显示错误.. 显示带有个人资料图片的用户时,die('Error') 给出错误提前感谢您的帮助......我正在学习 php,所以将转换为 pdo之后
<?php
include("dbconfig.php");
// Create connection
$conn=mysql_connect($db_host,$username,$password) or die('Error1');;
mysql_select_db("motorklq_glmindb",$conn) or die('Error2');
$result = mysql_query("SELECT adno,fname,lname,profilepic,gscore FROM gtable WHERE contest!='on' ORDER BY gscore DESC LIMIT 3") or die('Error');;
echo "<table><tr><th></th><th>gScore Leader</th><th></th><th></th></tr>";
echo "<tr><th>Firstname</th><th>Lastname</th><th>Image</th><th>Glamour</th></tr>";
while($row = mysql_fetch_array($result)){
print "<tr><td>".$row['fname']."</td><td>".$row['lname']."</td><td>".'<img src="data:image/jpeg;base64,' . base64_encode( $row['profilepic'] ) . '" width="32" height="32">'."</td><td>".$row['gscore']."</td></tr>";
}
print "</table>";
mysql_close($conn);
?>