Skip to content

Instantly share code, notes, and snippets.

@topspinppy
Created September 25, 2017 18:35
Show Gist options
  • Save topspinppy/8cb5ec2e7143b8e7b6889dca81385b1f to your computer and use it in GitHub Desktop.
Save topspinppy/8cb5ec2e7143b8e7b6889dca81385b1f to your computer and use it in GitHub Desktop.
<?php
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ไอพี)(PORT = พอรืต)))(CONNECT_DATA=(SID=ชื่อinstance)))";
$objConnect = oci_connect("ชื่อ","รหัส",$db);
if (!$objConnect)
echo 'Failed to connect to Oracle';
else
echo 'Succesfully connected with Oracle DB';
oci_close($objConnect);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment