I am having probs with fputs on my remote server. The files and directories are set to 777. When I do a fputs there are no errors but the file remains empty. Here is a simple script I have tried to debug the problem
<?php
error_reporting (E_ALL);
$filename = "text2.php";
$fd = fopen( "$filename", "w+" );
echo "file resource = $fd<br>"; // returns resource o.k
$filemessage = "2222223333 test message";
fputs($fd, $filemessage);
fclose( $fd );
$f_a = file($filename);
print_r ($f_a); // empty ?
?>