php pdo oracle
<?php
/**
* Created by mestars.
* User: mestars
* Date: 6/13/16
* Time: 10:52 PM
*/
header('Access-Control-Allow-Origin: *');
$tns = "
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.182.190.111)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = sd)
)
)
";
try {
$conn = new PDO("oci:dbname=".$tns, 'sd', 'sd');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
echo 'ERROR: ' . $e->getMessage();
}
echo '<br>';
foreach(PDO::getAvailableDrivers() as $driver)
echo $driver, '<br>';
?>
炊烟起了;夕阳下了;细雨来了
多调试,交互式编程体验
记录,独立思考,对比
感谢转载作者
修车
国产化
read and connect
匍匐前进,
讲故事