且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 SQL Server 驱动程序通过 PDO 连接到 SQL Server

更新时间:2022-11-17 11:17:27

好吧,PDO 的最大优点是可以非常轻松地访问任何数据库.如果您已经安装了这些驱动程序,您应该可以:

Well that's the best part about PDOs is that it's pretty easy to access any database. Provided you have installed those drivers, you should be able to just do:

$db = new PDO("sqlsrv:Server=YouAddress;Database=YourDatabase", "Username", "Password");