phpbar.de logo

Mailinglisten-Archive

[php] Upgrade PHP3 -> PHP4

[php] Upgrade PHP3 -> PHP4

=?iso-8859-1?Q?Bj=F6rn_Schotte?= bjoern_(at)_baer.main.de
Wed, 28 Jun 2000 11:12:15 +0200


* 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