$dbname="text"; $user="root"; $pwd=""; $dbh = new PDO("mysql:host=localhost;dbname=$dbname", $user, $pwd,array(PDO::MYSQL_ATTR_INIT_COMMAND=>'set names utf8;')); $rs = $dbh->query("select * from tt"); //var_dump($rs);die; $aa = $rs->fetchAll(); print_r($aa); foreach($rs as $key=>$value){ echo $value['title']; }
pdo 管理
最新推荐文章于 2021-03-23 21:54:15 发布