Sounds like a permissions issue. Nothing to do with php.
I see, thanks for the advice, then I can continue seek to find the 'why' :-)
$datatowrite = 'tmpl.dot';
$fhdl = fopen('\\\\10.0.0.7\\App\\test.txt', 'w') or die("can't open file");
fwrite($fhdl,$datatowrite);
fclose($fhdl);
Why is this code not working?
When I use this line the file successfully is created:
$fhdl = fopen('C:\\test.txt', 'w') or die("can't open file");
note: 10.0.0.7 is not the webserver but just a workstation on the same router as the webserver