taojintianxia commented on issue #11662:
URL: 
https://github.com/apache/shardingsphere/issues/11662#issuecomment-893292934


   following is the key part of the test application, written in PHP
   
   ```php
   $cset="GB2312";
   //$cset="UTF-8";
   header("Content-type:text/html;charset=$cset");
   
   
   
   
   function f_db_connection($host, $username, $passwd, $dbname, $port, $charset 
) /*数据库连接*/
   {
       $connection = new mysqli($host, $username, $passwd, $dbname, $port );
       if ($connection->connect_errno) {
           printf("db_connection failed: %s \n host=%s ,username=%s, passwd=%s, 
dbname=%s \n", $connection->connect_error,$host,$username, $passwd, $dbname);
          // printf($port) ;
           exit();
       }
       mysqli_set_charset($connection, $charset);
       //mysqli_query($connection, "set names utf8");
       return $connection;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to