<tfoot id='Vse6H'></tfoot>

    • <bdo id='Vse6H'></bdo><ul id='Vse6H'></ul>

    <legend id='Vse6H'><style id='Vse6H'><dir id='Vse6H'><q id='Vse6H'></q></dir></style></legend>

    <small id='Vse6H'></small><noframes id='Vse6H'>

    <i id='Vse6H'><tr id='Vse6H'><dt id='Vse6H'><q id='Vse6H'><span id='Vse6H'><b id='Vse6H'><form id='Vse6H'><ins id='Vse6H'></ins><ul id='Vse6H'></ul><sub id='Vse6H'></sub></form><legend id='Vse6H'></legend><bdo id='Vse6H'><pre id='Vse6H'><center id='Vse6H'></center></pre></bdo></b><th id='Vse6H'></th></span></q></dt></tr></i><div id='Vse6H'><tfoot id='Vse6H'></tfoot><dl id='Vse6H'><fieldset id='Vse6H'></fieldset></dl></div>

      1. 如何使用xampp将sql server与php连接起来?

        How to connect sql server with php using xampp?(如何使用xampp将sql server与php连接起来?)

            <tfoot id='ShngK'></tfoot>

          1. <i id='ShngK'><tr id='ShngK'><dt id='ShngK'><q id='ShngK'><span id='ShngK'><b id='ShngK'><form id='ShngK'><ins id='ShngK'></ins><ul id='ShngK'></ul><sub id='ShngK'></sub></form><legend id='ShngK'></legend><bdo id='ShngK'><pre id='ShngK'><center id='ShngK'></center></pre></bdo></b><th id='ShngK'></th></span></q></dt></tr></i><div id='ShngK'><tfoot id='ShngK'></tfoot><dl id='ShngK'><fieldset id='ShngK'></fieldset></dl></div>
          2. <small id='ShngK'></small><noframes id='ShngK'>

              <bdo id='ShngK'></bdo><ul id='ShngK'></ul>
                  <tbody id='ShngK'></tbody>
              1. <legend id='ShngK'><style id='ShngK'><dir id='ShngK'><q id='ShngK'></q></dir></style></legend>
                  本文介绍了如何使用xampp将sql server与php连接起来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用 Xampp 将我的 SQL 服务器与 PHP 连接起来.我已经在 ext 文件夹中上传了 dll 文件,但我无法连接它.我的 PHP 版本是 7.2.6.上传的 dll 文件是 - php_pdo_sqlsrv_72_ts.dll、php_sqlsrv_72_ts.dll.我已经编写了这段代码来连接我的 SQL 数据库和 PHP-

                  I am trying to connect my SQL server with PHP using Xampp. I have already uploaded dll files in the ext folder but I am unable to connect it. My PHP version is 7.2.6. Uploaded dll files are - php_pdo_sqlsrv_72_ts.dll, php_sqlsrv_72_ts.dll. I have written this code to connect my SQL database with PHP-

                  <?php   
                  $serverName = "INDO-SERVSQLEXPRESS,1443";  
                  $uid = "sa";     
                  $pwd = "XXXXXX";    
                  $databaseName = "web";  
                  $connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database"=>$databaseName);  
                  $conn = sqlsrv_connect( $serverName, $connectionInfo);  
                  if( $conn )  
                  {  
                       echo "Connection established.
                  ";  
                  }  
                  else  
                  {  
                       echo "Connection could not be established.
                  ";  
                       die( print_r( sqlsrv_errors(), true));  
                  }  
                  sqlsrv_close( $conn);  
                  ?>     
                   
                   

                  我在尝试这个时遇到了这个错误-

                  I am getting this error when I had tried this-

                  致命错误:未捕获错误:调用未定义函数C:xampphtdocsiometricdb.php:7 中的 sqlsrv_connect() 堆栈跟踪:#0{main} 在第 7 行的 C:xampphtdocsiometricdb.php 中抛出.

                  Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in C:xampphtdocsiometricdb.php:7 Stack trace: #0 {main} thrown in C:xampphtdocsiometricdb.php on line 7.

                  任何人都知道我做错了什么或如何连接数据库.

                  Anyone has an idea where I am doing wrong or how to connect with the database.

                  推荐答案

                  可以为 SQL Server 安装 PHP 驱动程序(sqlsrv 和/或 pdo_sqlsrv PHP 扩展)遵循以下步骤:

                  Installation of PHP Driver for SQL Server (sqlsrv and/or pdo_sqlsrv PHP extensions) can be done following the next steps:

                  • 基于 Microsoft PHP Drivers for SQL Server Support Matrix 下载此驱动程序的适当版本.在您的情况下 - 版本 5.2 或 5.3(32 位或 64 位也取决于 PHP 版本).
                  • 下载并安装适当的 ODBC 驱动程序 - 请参阅 Microsoft Drivers for PHP for SQL Server 的系统要求
                  • 加载 SQL Server 的 PHP 驱动程序作为 PHP 扩展.
                  • 重启 Apache
                  • Based on Microsoft PHP Drivers for SQL Server Support Matrix download appropriate version of this driver. In your case - version 5.2 or 5.3 (32-bit or 64-bit also depends on PHP version).
                  • Download and install an appropriate ODBC driver - see System Requirements for the Microsoft Drivers for PHP for SQL Server
                  • Load PHP Driver for SQL Server as PHP extension.
                  • Restart Apache

                  使用 <?php phpinfo();?> 检查配置.应该有一个名称为 pdo_sqlsrv(如果您使用 PDO)和/或 sqlsrv(没有 PDO)的部分.

                  Check the configuration with <?php phpinfo();?>. There should be a section with name pdo_sqlsrv (if you use PDO) and/or sqlsrv (without PDO).

                  这篇关于如何使用xampp将sql server与php连接起来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                • <small id='4rB7R'></small><noframes id='4rB7R'>

                      • <bdo id='4rB7R'></bdo><ul id='4rB7R'></ul>
                        <tfoot id='4rB7R'></tfoot>
                          <tbody id='4rB7R'></tbody>
                        <legend id='4rB7R'><style id='4rB7R'><dir id='4rB7R'><q id='4rB7R'></q></dir></style></legend>
                        <i id='4rB7R'><tr id='4rB7R'><dt id='4rB7R'><q id='4rB7R'><span id='4rB7R'><b id='4rB7R'><form id='4rB7R'><ins id='4rB7R'></ins><ul id='4rB7R'></ul><sub id='4rB7R'></sub></form><legend id='4rB7R'></legend><bdo id='4rB7R'><pre id='4rB7R'><center id='4rB7R'></center></pre></bdo></b><th id='4rB7R'></th></span></q></dt></tr></i><div id='4rB7R'><tfoot id='4rB7R'></tfoot><dl id='4rB7R'><fieldset id='4rB7R'></fieldset></dl></div>