Working with MS SQL SERVER on PHP5.6

大兔子大兔子 提交于 2020-01-30 10:36:28

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/25833043/working-with-ms-sql-server-on-php5-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!