Jump to content

fopen on a class dont work! wth?


neohunter

Recommended Posts

Why this dont work:

[code]
<?
class updates {
function test(){
$data = "wow";
if(($fp=fopen('test.hex',"wb"))){
fwrite($fp,$data);
fclose ($fp);
}
}
}
$test = new updates();
$test->test();
?>
[/code]

and this, without the class work:

[CODE]
<?
$data = "wow";
if(($fp=fopen('test.hex',"wb"))){
fwrite($fp,$data);
fclose ($fp);
}
?>
[/CODE]
Link to comment
https://forums.phpfreaks.com/topic/28582-fopen-on-a-class-dont-work-wth/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.