doutian3010 2015-07-20 08:54
浏览 81
已采纳

带有USBWebserver的php的SQL服务器

I have installed the lastest version of sql-server for php. I use a simple USBWebserver and I have pasted all the driver files to the map C:\php\ext (see image below). In the file php\php.ini, I have place this string behind:

extension=php_sqlsrv_56_ts.dll

Here can you see all the files in C:\php\ext for running the driver: files for running the driver Whit this I have no errors (but maybe he didn't throw it).


Now my problem is when I make my connection to the sql server database. I have the following error:

Fatal error: Call to undefined function sqlsrv_connect() in c:oot\add.php on line 2

This is my code where I've the exception:

$conn = sqlsrv_connect( array("Database"=>"Immo"), ".\\SQLEXPRESS");

Can anyone help me?
Thanks and sorry for my poor english.

  • 写回答

1条回答 默认 最新

  • dst3605528 2015-07-28 11:54
    关注

    The string that you must place in your php\php.ini file is this:

    extension=php_sqlsrv_54_ts.dll
    

    And for make a connection you must turn the two arguments from place.

    $conn = sqlsrv_connect(".\\SQLEXPRESS", array("Database"=>"Immo"));
    

    This has help me to make a connection to a SQL-server with php.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!