Hello all, I am very new to HTML and PHP coding so could you please bear with me.
All I am trying to do is write a string to a text file, and I have tried many examples. Alot of them seem to be similar to this code and it doesn't seem to want to work...
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function WriteFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fh = fso.CreateTextFile("c:\\MyFile.txt", true);
fh.WriteLine("Some text goes here...");
fh.Close();
}
</SCRIPT>
</HEAD>
<BODY>
<P>
<SCRIPT language="JavaScript"> WriteFile(); </SCRIPT>
</P>
</BODY>
</HTML>
What I do is I put this code in Notepad, save it has hello.html and I then open it in firefox. I then check the file and its still empty, then I open in it Internet Explorer and the same thing happens.
Any help appreciated.