PHP Pear Openbook
PHP PEAR Buch von Galileo computing als OpenBook ans Herz legen.
Quelle:
Rootserver-Blog
// load the zend Framework
define("LIB_DIR","lib");
$include_path = get_include_path();
if(!ini_set('include_path',$include_path.PATH_SEPARATOR.ABSOLUTE_PATH.LIB_DIR)) {
die('Failed to set the include path. Check you php configuration.');
}
lib/
lib/Zend
lib/Zend/Acl
lib/Zend/....
require_once 'Zend/Mail.php';
uses('rdbms.DriverManager'); // load the Mysql database class
$db = DriverManager::getConnection('mysql://user:test@127.0.0.1'); // database settings
try {
$db->connect();
$db->selectdb('db_name'); // selected database
}
catch (SQLException $e) {
print_r($e->compoundMessage());
}try {
$query = $db->query("SELECT * FROM `option`");
while($result = $query->next()) {
$yeOptions[$result['key']] = $result['value'];
}
}
catch(SQLexception $e) {
print_r($e->compoundMessage());
}
// hide
document.getElementById('row_1').style.display = 'none';
// show
document.getElementById('row_1').style.display = '';