Description Usage Arguments Details See Also
Read database config file with key=value format:
key=value
key2=value2
etc. into a named list.
Keys must include dbType
passed in to DBI::dbDriver
to load the appropriate driver (i.e. MySQL, PostgreSQL, SQLite, etc.)
and any parameters like host
, user
, password
, dbname
that should be passed into the DBI::dbConnect function call for your driver.
1 | dbCfg(filePath)
|
filePath |
The file path to the config file to be read in. Must be absolute or relative to the working directory from |
The result of this function call is just a list with named entries. As long as the entries are valid, it can be generated in other ways. Note that the ability to specify a single file that contains database configuration information allows for multiple users to share a code based, but provide their personal credentials in their copy of the relevant cfg file. Due to the inevitability of code conflicts with these files where user names and passwords are different for each user and the fact that it is insecure and unwise to include database credentials in any version control system, this means that such dbCfg files should not be checked into version control.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.