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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -