Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing to files on a webserver

Status
Not open for further replies.

WintersMystic

Programmer
Aug 8, 2001
39
US
is it possible to write to a txt file on a webserver with VBScript??

say like in perl its

Code:
<form>
<input type=submit name=now value=&quot;Write&quot;>
</form>

if(param('now')){
&Sample;
}

sub Sample{
open(FILE, &quot;>write.txt&quot;);
print FILE &quot;HI&quot;;
close(FILE);
}
 


WintersMystic,

Yes.

Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set f1 = fso.CreateTextFile(&quot;c:\docs\myfile.txt&quot;)
f1.writeline &quot;test&quot;
f1.writeblanklines(1)
f1.close



fengshui1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top