Changeset 22181 for branches/2.5/include
- Timestamp:
- Apr 12, 2013, 11:56:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/include/dblayer/functions_mysqli.inc.php
r21088 r22181 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.