i'm using the following code to create a file
$fn = "file.php";
$FileHandle = fopen($fn, 'w+') or die("can't open file");
$stringData = "Something";
fwrite($FileHandle, $stringData);
fclose($FileHandle);
when i check the file properties i can see that the file's permission is set to 644 so when i use the following code to delete it i get a permission denied error
$myFile = "file.php";
$fh = fopen($myFile, 'w') or die("can't open file");
fclose($fh);
$myFile = "$file.php";
unlink($myFile);
what shall i do to set the permission to 777 when creating the file?