Date: 09/28/00
- Next message: Maurice Jumelet: "Re: [phplib] Parse error"
- Previous message: messju mohr: "Re: [phplib] Parse error"
- In reply to: Maurice Jumelet: "Re: [phplib] Parse error"
- Next in thread: Maurice Jumelet: "Re: [phplib] Parse error"
- Reply: Maurice Jumelet: "Re: [phplib] Parse error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
On Thu, 28 Sep 2000, Maurice Jumelet wrote:
> I had this error too....
>
> The rigth way in php4.0 is....
>
> class test {
> var $var;
>
> test() {
> global $var
> this->host = $var;
> }
> }
>
> you may not declare variables directly anymore, sorry for that...
you mean '$this->var = $var;' ?? (the "'" are english not php)
yepp, this then one could define a DB_Sql class:
class DB_SendCard extends DB_Sql {
function DB_SendCard($query = "") {
global $dbhost...
$this->Host = $dbhost...
$this->DB_Sql($query);
}
}
this is really worth a try. I think I love this list :)
regards
messju mohr
> Maurice
> NOXX.COM
>
> ----- Original Message -----
> From: "Peter Bowyer" <reywob <email protected>>
> To: <phplib <email protected>>
> Sent: Thursday, September 28, 2000 8:45 PM
> Subject: [phplib] Parse error
>
>
> > Hi,
> >
> > Can anyone tell me why this is generating a parse error on the line
> > marked >>>>>> (and I guess on the following lines as well)?
> >
> > include ("./db_pgsql.inc");
> > include ("./postcard_setup.php");
> > include("./class.FastTemplate.php");
> >
> > class DB_SendCard extends DB_Sql {
> > >>>>>> var $Host = $dbhost;
> > var $Database = $dbname;
> > var $User = $dbuser;
> > var $Password = $dbpassword;
> > }
> > $db = new DB_SendCard ;
> >
> > The postcard_setup.php file contains the following:
> >
> > // Enter your database details:
> > // Database name:
> > $dbname="abcdefg";
> > // Username:
> > $dbuser="username";
> > // Database host:
> > $dbhost="db.yoursite.f2s.com";
> > // Database password:
> > $dbpassword="********";
> >
> > What's wrong? It works fine on a server running PHP version 3.0.16 and
> > PostgreSQL, but not on a server running PHP 4.02 and MySQL.
> >
> > TIA,
> > Peter.
> > --oOo--
> > Narrow Gauge on the web - photos, directory and forums!
> > http://www.narrowgauge.f2s.com
> > --oOo--
> > Peter's web page - Scottish narrow gauge in 009
> > http://members.aol.com/reywob/
> > --oOo--
- --
Matthias Mohr <m.mohr <email protected>> (Software-Entwicklung)
Internet Factory AG, Niederlassung Industriestr. 11, 26121 Oldenburg
Tel: (+49) (0)441 - 77 92 10 Fax: (+49) (0)441 - 77 92 177
http://www.internet-factory.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: public key @ http://messju.internet-factory.de/public.key
iD8DBQE506CuubKPpFA4n0URAj9+AJ0YVWzIIa2kQUjRKKL4kWx2fqqr6QCeN/SE
vrozofg+G/nbu9H2ZCI3JBc=
=Xg5v
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Maurice Jumelet: "Re: [phplib] Parse error"
- Previous message: messju mohr: "Re: [phplib] Parse error"
- In reply to: Maurice Jumelet: "Re: [phplib] Parse error"
- Next in thread: Maurice Jumelet: "Re: [phplib] Parse error"
- Reply: Maurice Jumelet: "Re: [phplib] Parse error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

