<legend id='EjTdu'><style id='EjTdu'><dir id='EjTdu'><q id='EjTdu'></q></dir></style></legend>
    1. <small id='EjTdu'></small><noframes id='EjTdu'>

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

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

        PHP - 在 PDO 连接后消失的语言环境信息 (DB2)

        PHP - locale information gone after PDO connection (DB2)(PHP - 在 PDO 连接后消失的语言环境信息 (DB2))
          <bdo id='nXYrD'></bdo><ul id='nXYrD'></ul>
            <tbody id='nXYrD'></tbody>
              <i id='nXYrD'><tr id='nXYrD'><dt id='nXYrD'><q id='nXYrD'><span id='nXYrD'><b id='nXYrD'><form id='nXYrD'><ins id='nXYrD'></ins><ul id='nXYrD'></ul><sub id='nXYrD'></sub></form><legend id='nXYrD'></legend><bdo id='nXYrD'><pre id='nXYrD'><center id='nXYrD'></center></pre></bdo></b><th id='nXYrD'></th></span></q></dt></tr></i><div id='nXYrD'><tfoot id='nXYrD'></tfoot><dl id='nXYrD'><fieldset id='nXYrD'></fieldset></dl></div>

              <tfoot id='nXYrD'></tfoot><legend id='nXYrD'><style id='nXYrD'><dir id='nXYrD'><q id='nXYrD'></q></dir></style></legend>

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

                • 本文介绍了PHP - 在 PDO 连接后消失的语言环境信息 (DB2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  PHP 在使用 PDO 连接到 DB2 后丢失所有语言环境信息有什么原因吗?

                  Is there any reason why PHP loses all locale information after connecting to DB2 with PDO?

                  连接后我总是需要重新设置区域信息.

                  I always have to set the locale information again after a connnection.

                  <?PHP
                  //set locale information
                  setlocale( LC_MONETARY,'en_US' );
                  
                  //print location information
                  print_r(localeconv());
                  
                  //    Array
                  //    (
                  //      [decimal_point] => .
                  //      [thousands_sep] => 
                  //      [int_curr_symbol] => USD 
                  //      [currency_symbol] => $
                  //      [mon_decimal_point] => .
                  //      [mon_thousands_sep] => ,
                  //      ...
                  //    )
                  
                  //************************************************
                  //create conenction to server
                  $connection= new PDO("odbc:server", 'username', 'password');
                  //************************************************
                  
                  //see locale information after creating a connection
                  print_r(localeconv());
                  
                  //    Array
                  //    (
                  //      [decimal_point] => .
                  //      [thousands_sep] => 
                  //      [int_curr_symbol] => 
                  //      [currency_symbol] => 
                  //      [mon_decimal_point] => 
                  //      [mon_thousands_sep] => 
                  //      ...
                  //
                  //    )
                  ?>
                  

                  推荐答案

                  如果你在 Windows 上,那么一般的问题是 setlocale() 不起作用.在我的情况下,它在脚本中的随机点切换到基本语言环境,在脚本运行时.我赢得了 7 个专业的 64 位.当时没有其他脚本在运行.

                  If you are on Windows, then there is general problem that setlocale() doesn't work. In my case it switched to base locale at random point in script, at the time of script was run. I had win 7 professional 64bit. No other script were running at that time.

                  这篇关于PHP - 在 PDO 连接后消失的语言环境信息 (DB2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)
                    <bdo id='WiRgs'></bdo><ul id='WiRgs'></ul>

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

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

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