简体   繁体   中英

Working with MS SQL SERVER on PHP5.6

So I have a trouble here. Tried use mssql_connect() but interpeter says that function is undefinied. PHP.net advices this , but it suppports only older versions of PHP. Is it possible to connect to MS SQL Server database from PHP5.6? What extensions should I add, what functions can I use?

Configuration details: localhost, Apache 2.4, PHP 5.6, OS Windows 8.

You need to enable the MSSQL extension in the PHP.ini file.

If this extension is not installed, you need to install it in PHP.

Please tell your server details (OS/WebServer like apache nginx) so that I can explain in detail.

Use

 <?php phpinfo();?>

to see what are available with your php installation. I advice you to use PDO instead of mysql_* functions. It supports several databases not only MSSQL or MySQL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM