Why does my server keep creating new files with 0640 permissions in my PHP fwrite?

Erin

New Member
I'm using a simple \[code\]fopen("w")\[/code\] and \[code\]fwrite\[/code\] setup to write a new file on my server. Recently, this has been arbitrarily assigning 0640 permissions to these files, which means I can't view them from a browser. But it's not happening every time. Can anybody tell me why? What I'm missing here? Here's my code:\[code\]if ($file=fopen("$filesDir/$yr/$mo/{$tempFile[0]}.xml","wb")) { if(fwrite($file,$output,strlen($output))) { $success="YES"; $message="File successfully built."; } else { $message="Could not write XML file."; }} else { $message="Could not open file.";}\[/code\]
 
Back
Top