<html>
<head>
</head>
<body>
<?php
//r=readonly, r+=(r+w), w=overwrite-new, w+-overwrite&read-new, a=append(write), a+=append(r+w)
$filename = "testfile.txt";
$fp = fopen($filename, 'w');
if (is_writable($filename))
{
$buffer = "test123\ntest456\ntest789";
fwrite($fp, $buffer);
fclose($fp);
}
else {
clearstatcache();
echo "Cannot write to ".$filename." - Check permissions.";
}
?>
</body>
</html>