Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 52 lines (40 sloc) 1.24 kb
<?php
/* CONFIGURATION */
// Path from root to directory containing Zend library.
define('PATH_ZEND', '');
// Path from root to directory containing Plants library (Git working tree).
define('PATH_PLANTS', '');
// Path from root to errorlog file.
define('FILEPATH_ERRORLOG', '');
// Database connection configuration.
define('DB_HOST', '');
define('DB_USERNAME', '');
define('DB_PASSWORD', '');
define('DB_DBNAME', '');
// JSTOR login configuration.
define('JSTOR_USERNAME', '');
define('JSTOR_PASSWORD', '');
/* BOOTSTRAP - do not edit below this line */
ini_set('display_errors', 1);
set_include_path(get_include_path()
. PATH_SEPARATOR . PATH_ZEND
. PATH_SEPARATOR . PATH_PLANTS);
// Set the database object.
require_once 'Zend/Db.php';
/**
* Connect to MySQL and return the database adapter.
*
* @return Zend_Db_Adapter_Mysqli
*/
function getDb()
{
return Zend_Db::factory('Mysqli', array(
'host' => DB_HOST,
'username' => DB_USERNAME,
'password' => DB_PASSWORD,
'dbname' => DB_DBNAME,
'persistent' => true, // Set to persistant connection
'charset' => 'utf8', // must include utf8 charset
));
}
$db = getDb();
Jump to Line
Something went wrong with that request. Please try again.