<?php
/*========== install at ubuntu: ==============
sudo apt install php-sybase
//==================================
append this into /etc/freetds/freetds.conf:
(192.168.0.250:2638 is an example:)
//==================================
sudo nano /etc/freetds/freetds.conf
[connName]
host = 192.168.0.250
port = 2638
tds version = 7.4
database = MYDB
//====== php: */
$connName = "connName";
$user = "myuser";
$pass = "mypass";
$st="dblib:host=$connName;charset=iso8859-1";
$conn = new PDO($st,$user,$pass);
/* $conn->prepare($sql_query);
...etc
*/
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter