apache 在 Linux 上从 PHP 连接到 MS SQL Server?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/507479/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Connect to MS SQL Server from PHP on Linux?
提问by Liam
I need to connect to an MS SQL Server database from a PHP script running on a Linux server. I'm looking at using FreeTDS as there is no official MS SQL Server driver for Linux. Is this my best option? Is it ok in a production environment? Are there other options, perhaps ODBC?
我需要从 Linux 服务器上运行的 PHP 脚本连接到 MS SQL Server 数据库。我正在考虑使用 FreeTDS,因为没有用于 Linux 的官方 MS SQL Server 驱动程序。这是我最好的选择吗?在生产环境下可以吗?还有其他选择吗,也许是 ODBC?
采纳答案by Wally Lawless
The company I work for has been running FreeTDS to connect to SQL 2000 on our production server for almost 6 years now. There's a couple of issues with special character encoding, but overall it works well.
我工作的公司已经运行 FreeTDS 以连接到我们生产服务器上的 SQL 2000 近 6 年了。特殊字符编码存在一些问题,但总体而言效果很好。

