PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
According to your output it should be working so not sure what to tell you other than to make sure you're code has permission to write to that file. Also maybe give http://us.php.net/file_put_contents a try. I normally use that unless need dictates otherwise which in your case it doesn't seem to.