longcn06aht
New member
- Joined
- Jul 10, 2014
- Messages
- 1
Dear all,
I'm already install freeTDS with following instruction:
http://www.plugged.in/linux/installing-ms-sql-module-to-php-on-directadmin.html
I connect to MSSQL by command tsql -S $server -U $user --> success.
But when i run a php code to connect to MSSQL server i get nothing.
my system: Centos 5.6, php 5.3 Directadmin installed.
My php code:
<?php
$server = '<ip>';
// Connect to MSSQL
$link = mssql_connect($server, 'sa', '@Aa123456');
if (!$link) {
echo "connect khong thanh cong";
die();
}else{
echo "Locpv connect thanh cong";
}
mssql_select_db("vhu", $link ) or die ("Can't connect to Database");
?>
please help me!
Thanks
I'm already install freeTDS with following instruction:
http://www.plugged.in/linux/installing-ms-sql-module-to-php-on-directadmin.html
I connect to MSSQL by command tsql -S $server -U $user --> success.
But when i run a php code to connect to MSSQL server i get nothing.
my system: Centos 5.6, php 5.3 Directadmin installed.
My php code:
<?php
$server = '<ip>';
// Connect to MSSQL
$link = mssql_connect($server, 'sa', '@Aa123456');
if (!$link) {
echo "connect khong thanh cong";
die();
}else{
echo "Locpv connect thanh cong";
}
mssql_select_db("vhu", $link ) or die ("Can't connect to Database");
?>
please help me!
Thanks