|
Posted by peter on 02/25/07 17:37
> Actually, PHP4 does support the mysqli object, also.
>
> But in PHP5 your constructors are named __construct, not the class name.
> So you need to change the constructor name in your class, and call
>
> parent::construct(...)
Also just thought of another clarification. If you do not declare a
constructor for a class that extends another class, the parent constructor
will be called. for example the following code snippet will output "parent
constructor and the input was THIS TEXT":-
<?php
class c1
{
function __construct($input)
{
echo "parent constructor and the input was ".$input;
}
}
class c2 extends c1
{
}
$c = new c2('THIS TEXT');
?>
Navigation:
[Reply to this message]
|