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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -