Jump to content

[SOLVED] fclose error


dink87522

Recommended Posts

I am getting the following error when I go to write.close to my file.

 

"Warning: fwrite(): 2 is not a valid stream resource in /home/dinksoft/public_html/question3.php on line 513

 

Warning: fclose(): 2 is not a valid stream resource in /home/dinksoft/public_html/question3.php on line 514"

 

I chmoded the file 777 permissions.

 

I am writing an array to a file, could that be causing a problem?

 

$stat_01_data[$stat_01_handle] = "h".$stat_01_handle.",".$stat_01_pieces[1].",".$stat_01_pieces[2];
	fwrite($stat_01, $stat_01_data);
	fclose($stat_01);

Link to comment
https://forums.phpfreaks.com/topic/170465-solved-fclose-error/
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.