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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -