正在回答
1回答
你好,建议参考:
<?php $dsn_con="oci:dbname=//192.168.4.12:1521/ORCL;charset=UTF8"; try{ $dbh= new PDO($dsn_con,"ysc","123456",array(PDO::ATTR_PERSISTENT => true)); } catch (PDOException $e) { print "oci: " . $e->getMessage() . "<br/>"; die(); } $sql="select * from s_user"; $dbh->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER); $rs=$dbh->prepare($sql); $rs->execute($array); $rs->setFetchMode(PDO::FETCH_ASSOC); $result_arr = $rs->fetchAll(); echo json_encode($result_arr); ?>
如果解决您的问题请采纳,祝学习愉快!
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星