JavaScript can't do it either, in general.
JavaScript, in the browser, could change a file on the client machine (that is, the machine where the HTML is being displayed). But ONLY if (a) your site is marked as "trusted" by the browser user and (b) if the browser user allows it, even so!
And remember, that file, on the same machine as the browser user, is not visible to your code on the server.
As for printing that file, again it will only get printed if the user allows it.
If you don't understand the differences between servers and clients, then that would be a place to start your learning process. If you do, then you need to define this task to us better, in terms of what is supposed to happen on the client and what on the server.
If this is supposed to be entirely client-side code, then I don't think that you should be using a browser, at all. You should be looking at "stand alone" programs, instead.
|