摘要:
"set names utf8"));//最后一个参数使用utf8 }catch (PDOException $e) { echo "error:".$e->getMessage(); exit;}$result = $pdo->prepare("select * from t_user");$result->execute();$return = $result->fetchAll(PDO::FETCH_ASSOC);echo json_encode($return);?> 阅读全文