I dunno if I have understood the question...
you are writing to a file served by some webserver? you want to open it locally? is the content wrote to the file?
In the future put some effort in writing a fully understandable question.
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.