Changeset 22182 for trunk/include/dblayer/functions_mysqli.inc.php
- Timestamp:
- Apr 12, 2013, 11:59:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/dblayer/functions_mysqli.inc.php
r21088 r22182 37 37 { 38 38 global $mysqli; 39 40 $mysqli = new mysqli($host, $user, $password); 39 40 // exemples of $host 41 // 42 // $host = localhost 43 // $host = 1.2.3.4:3405 44 // $host = /path/to/socket 45 46 $port = null; 47 $socket = null; 48 49 if (strpos($host, '/') === 0) 50 { 51 $host = null; 52 $socket = $host; 53 } 54 elseif (strpos($host, ':') !== false) 55 { 56 list($host, $port) = explode(':', $host); 57 } 58 59 $dbname = null; 60 61 $mysqli = new mysqli($host, $user, $password, $dbname, $port, $socket); 41 62 if (mysqli_connect_error()) 42 63 {
Note: See TracChangeset
for help on using the changeset viewer.