PHP: how to used a class function? -
i'm quite new , having trial , test creating class , objects.
here's script:
<?php class testingm { private $t; public function __construct($file) { $this->t = fopen($file, 'rb') } } $test = new testingm; $s = new file($_get['n']); ?>
the script says
warning: missing argument 1 testingm::__construct(), called in
how can provide value $file variable? can guide me?
try
$test = new testingm($_get['n']);
Comments
Post a Comment