'Declara variaveis
Set fso = CreateObject("Scripting.FileSystemObject") 'Cria objeto FSO
Set es = fso.CreateTextFile(server.MapPath("novo.asp"),true) 'Cria arquivo novo.asp
es.writeline("<html><head><title>Arquivo novo</title></head><body>") 'Linha 1
es.writeline("CONTEUDO") 'Linha 2
es.writeline("</body></html>") 'Linha 3
es.close()
%> _linenums:0'><%Dim fso, es <strong class='bbc'>'Declara variaveis</strong>Set fso = CreateObject("Scripting.FileSystemObject") <strong class='bbc'>'Cria objeto FSO</strong>Set es = fso.CreateTextFile(server.MapPath("novo.asp"),true) <strong class='bbc'>'Cria arquivo novo.asp</strong>es.writeline("<html><head><title>Arquivo novo</title></head><body>") <strong class='bbc'>'Linha 1</strong>es.writeline("CONTEUDO") <strong class='bbc'>'Linha 2</strong>es.writeline("</body></html>") <strong class='bbc'>'Linha 3</strong>es.close() %>
Como voce pode ver o es.writeline cria uma linha nova em seu arquivo novo.asp, lembrando que dentro dele pode ter N linhas.
<%
Dim fso, es
Set fso = CreateObject("Scripting.FileSystemObject")
Set es = fso.CreateTextFile(server.MapPath("novo.asp"),true)
es.writeline("<html>")
es.writeline("<head><title>Arquivo novo</title></head>")
es.writeline("<body>")
es.writeline("<a href=""http://www.google.com.br"">GOOGLE</a><br>")
es.writeline("<a href=""http://www.resideweb.com.br"">ResideWeb</a><br>")
es.writeline("</body>")
es.writeline("</html>")
es.close()
%>[/
Edição feita por: Renan L. Queiroz, 04/11/2009, 15:12.
Inclusão da tag [ codebox ] para inclusão de scripts
...