<bdo id='ourSA'></bdo><ul id='ourSA'></ul>

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

    2. <legend id='ourSA'><style id='ourSA'><dir id='ourSA'><q id='ourSA'></q></dir></style></legend>

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

      如何让 php 与 postgresql 一起工作?

      时间:2023-09-19
    3. <i id='oyNES'><tr id='oyNES'><dt id='oyNES'><q id='oyNES'><span id='oyNES'><b id='oyNES'><form id='oyNES'><ins id='oyNES'></ins><ul id='oyNES'></ul><sub id='oyNES'></sub></form><legend id='oyNES'></legend><bdo id='oyNES'><pre id='oyNES'><center id='oyNES'></center></pre></bdo></b><th id='oyNES'></th></span></q></dt></tr></i><div id='oyNES'><tfoot id='oyNES'></tfoot><dl id='oyNES'><fieldset id='oyNES'></fieldset></dl></div>
      <tfoot id='oyNES'></tfoot>

              <bdo id='oyNES'></bdo><ul id='oyNES'></ul>
            • <small id='oyNES'></small><noframes id='oyNES'>

            • <legend id='oyNES'><style id='oyNES'><dir id='oyNES'><q id='oyNES'></q></dir></style></legend>
                  <tbody id='oyNES'></tbody>
                本文介绍了如何让 php 与 postgresql 一起工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                <?php
                
                try {
                   $dbh = new PDO('pgsql:host=localhost;port=5432;dbname=###;user=###;password=##');
                   echo "PDO connection object created";
                }
                catch(PDOException $e)
                {
                      echo $e->getMessage();
                }
                
                ?>
                

                我收到错误消息无法加载驱动程序"

                I get the error message "Could Not Load Driver"

                推荐答案

                试试这个:

                在 php.ini 中通过删除;"取消注释以下内容

                Uncomment the following in php.ini by removing the ";"

                ;extension=php_pgsql.dll
                

                使用以下代码连接到 postgresql 数据库服务器:

                Use the following code to connect to a postgresql database server:

                pg_connect("host=localhost dbname=dbname user=username password=password")
                    or die("Can't connect to database".pg_last_error());
                

                这篇关于如何让 php 与 postgresql 一起工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:调用未定义的方法 PDO::execute() 下一篇:在 PHP PDO 中获取上次执行的查询

                相关文章

                最新文章

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

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