Phpgrid主檔修正

出自TSK WIKI
於 2016年5月13日 (五) 04:48 由 Root​(留言 | 貢獻) 所做的修訂 (→ADODB5 UTF8 修正)
跳至導覽 跳至搜尋

ADODB5 UTF8 修正

<PHP> //phpGrid_Enterprise\conf.php

               define('PHPGRID_DB_TYPE', 'mssqlnative');  // database type

//phpGrid_Enterprise\server\classes\cls_db.php

               case "mssqlnative":
                               $this->db = ADONewConnection($this->dbType);
                                               //$this->db = ADONewConnection($this->dbType);
                                               // DSN connectivity through SQL Native Client 10.0 ODBC Driver
                                               //$dsn = $this->hostName.",Database=".$this->databaseName.";";                                                       
                               $this->db->Connect($this->hostName, $this->userName, $this->password,$this->databaseName);
               break;

//phpGrid_Enterprise\server\adodb5\drivers\adodb-mssqlnative.inc.php

               $connectionInfo = $this->connectionInfo;
               $connectionInfo["Database"]=$argDatabasename;
               $connectionInfo["UID"]=$argUsername;
               $connectionInfo["PWD"]=$argPassword;
               $connectionInfo["CharacterSet"]='UTF-8';  //增加這一行 將字元改成 utf8

//這樣直接就可以秀出UTF8 而不用透過 ICONV 來轉換了 </PHP>