Additional keys can be added by appending a URI query string to the
end of the DSN.
The format of the supplied DSN is in its fullest form:
driver://user:password@protocol+host/database?option=8&another=true
Most variations are allowed:
driver://user:password@protocol+host:110//usr/db_file.db?mode=0644
driver://user:password@host/dbname
driver://user:password@host
driver://user@host
driver://host/dbname
driver://host
driver
This function is 'borrowed' from PEAR /DB.php . public static parseDSN ( string $dsn ) : array | ||
$dsn | string | Data Source Name to be parsed |
리턴 | array | an associative array with the following keys: + driver: Database backend used in PHP (mysql, odbc etc.) + host: Host specification (hostname[:port]) + dbname: Database to use on the DBMS server + username: User name for login + password: Password for login |