driver Installation:
1. Download Microsoft official PHP driver for SQL Server, http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
2. Install the SQLSRV31. EXE file, that is, unzip3. Copy files (thread-safe)Php_pdo_sqlsrv_55_ts.dll and php_sqlsrv_55_ts.dll to \xampp\php\ext4. Modify the \xampp\php\php.ini file and add it under [PHP]Extension=php_pdo_sqlsrv_55_ts.dllExtension=php_sqlsrv_55_ts.dll5. Restart the computer (may not be required)
SQLSRV function Encoding Conversion : page encoding UTF-8method One: Specify a character set when connecting$conInfo =array (' Database ' = $database, ' UID ' + $uid, ' PWD ' + $pwd,
' CharacterSet ' = ' UTF-8') ; $link =sqlsrv_connect ($serverName, $conInfo); method Two: Use Iconv manual conversion when accessingconverting encoding to GB2312 when writing to SQL Servericonv (' utf-8 ', ' Gb2312//ignore ', ' string to write to the database ');convert encoding to UTF-8 when reading SQL Server stringsiconv (' GB2312 ', ' utf-8//ignore ', ' Database return string '));
PDO function Encoding Conversion : Web page encoding UTF-8, no conversion required, Pdo::sqlsrv_encoding_utf8 for default encodingDatabase Connection Example:$c = new PDO ("Sqlsrv:server=localhost;database=testdb", "UserName", "Password");$c = new PDO ("Sqlsrv:server=localhost,1521;database=testdb", "UserName", "Password");connect to a MS SQL Server database on a specified port 1521.
and MySQL a lot slower than the speed
PHP (v5.5.15) Access SQLServer2014 in XAMPP (v1.83)