Mailinglisten-Archive |
Probier's mal so; >class databaseConnection { > > var $conn; > var $mysqlHost; > var $mysqlUser; > var $mysqlPwd; > var $mysqlDb; > function databaseConnection($news_dbuser, $news_dbpasswd, $news_dbname, $news_dbhost="localhost") { $this->mysqlHost = $news_dbhost; $this->mysqlUser = $news_dbuser; $this->mysqlPwd = $news_dbpasswd; $this->mysqlDb = $news_dbname; } >} Und nun erzeugst Du an der entsprechenden Stelle in Deinem Code eine Instanz $dbc der Klasse databaseConnection mit $dbc = new databaseConnection($GLOBALS["news_dbuser"], $GLOBALS["news_dbpasswd"], $GLOBALS["news_dbname"]); --- Thomas Beckmann, Kiel, Germany beckmann_(at)_gis.de
php::bar PHP Wiki - Listenarchive