Can be used in Sybase's Db-lib or Ct-lib library, which also contains an ODBC library. Allows many applications to connect to Sybase or Microsoft's SQL Server;
Using FreeTDS under Windows
What is FreeTDS? FreeTDS is actually an open source (or can be said to be free) C library, it can be implemented under the Linux system Access operation of Microsoft's SQL database. FreeTDS is released as a source of code, and because of this, it can be compiled and installed in almost any system.
If your server is a Windows system, then you should use Php_dblib.dll. (more information with Using FreeTDS for Unix.)
1: Follow the link below to download Php_dblib.dll and save it to the/php/ext folder.
Https://docs.moodle.org/30/en/Installing_MSSQL_for_PHP#Using_the_SQL_Server_2005_Driver_for_PHP_from_Microsoft_on_Windows
2. Add in PHP config file/php/php.ini:
Extension=php_dblib.dll Restart Apache
3: Test:
1 <? PHP2 $link = mssql_connect (' localhost ', ' db_user ', ' Db_password '); 3 if(! $link) {4 echo' Could not connect '; 5 die (' Could not connect: '. mssql_error ()); 6 }7 echo' successful connection '; 8 mssql_close ($link); 9 ?>
OK, successful!!!
Reference: http://www.th7.cn/Program/php/201303/129462.shtml
SQL Server database created on Navicat Premium, implemented with PHP connection (i.e. PHP connection to Microsoft MSSQL)