Mailinglisten-Archive |
* Roland Scheike wrote:
> einen Parse-Error:
>
> 1: class dbclass {
> 2: var $Host = $conf[db][hostname]; // Host, auf dem MySQL läuft
Setz' das in deinen Constructor. Also:
class dbclass
{
function dbclass()
{
GLOBAL $conf;
$this->Host = $conf[db][hostname];
}
}
<http://www.php.net/version4/incompatibilities.php>:
| Static variable and class member initializers only accept scalar values (i
| PHP 3.0 they accepted any valid expression).
--
<?php class new_media_development {
var $url="http://www.rent-a-phpwizard.de/";
var $fon="0931/7843792"; var $fax="0931/7843795";
} /* Björn Schotte, "Mr. PHP" */ ?>
php::bar PHP Wiki - Listenarchive