Fwrite does not work

Is there any way to find out why fwrite is not working? I mean, as in .net (I'm a .net guy), the method simply throws an exception that can be caught, and the message error message and stack trace tells the whole story why the .net method did not work. Is there a way to find out why my fwrite is not working, because I believe my code is stable, because it works fine on one machine, but not on another. Please help. Thanks in advance.

Edit: it just returns false, leading me nowhere. :(

+3
source share
2 answers

Also: If you prefer to have exceptions instead of error / warning messages, do not use the basic functions of the file system. Open the file as follows:

$f = new SplFileObject("output", "w");
$f->fwrite("error");

, , .NET. ( , error_reporting(E_ALL); .)

+3

fwrite int fwrite ( resource $handle , string $string [, int $length ] )

$length fwrite, , .

0

All Articles