调试一下,看$dbh对象是不是存在。
这输出没错啊 $str就是个对象啊 你要把$str 循环遍历一下才能得出你想要的结果集啊foreach($str as $row){print_r($row);}试试