5 * Use PHP5 autoload for dynamic class loading
6 * (copy from program/incllude/iniset.php)
8 function __autoload($classname)
10 $filename = preg_replace(
11 array('/MDB2_(.+)/', '/Mail_(.+)/', '/^html_.+/', '/^utf8$/'),
12 array('MDB2/\\1', 'Mail/\\1', 'html', 'utf8.class'),
15 include_once $filename. '.php';
20 * Shortcut function for htmlentities()
22 * @param string String to quote
23 * @return string The html-encoded string
27 return htmlentities($string, ENT_COMPAT, 'UTF-8');
32 * Fake rinternal error handler to catch errors
34 function raise_error($p)
36 $rci = rcube_install::get_instance();
37 $rci->raise_error($p);