salve a tutti
ho creato il seguente script che legge una pagina web esterna e salva il contenuto in un file.
ricevo però il seguente errorecodice:<%@language=vbscript%> <% option explicit %> <% response.Buffer=false%> <% dim myURL, xmlhttp, mypost, mypage myURL = "http://forum.ioguadagno.it/elenco.php" Set XMLHTTP = Server.CreateObject("Msxml2.xmlhttp") XMLHTTP.open "GET", myURL, false XMLHTTP.send myPost myPage = XMLHTTP.responseText const forreading=1 dim objopenfile, objfso, strpath strpath=server.MapPath("/public/grabbing/prova.txt") set objfso = server.CreateObject("scripting.filesystemobject") set objopenfile=objfso.createtextfile(strpath, true) objopenfile.writeline(mypage) objopenfile.close set objopenfile = nothing set objfso = nothing Response.Write myPage Set XMLHTTP = Nothing %>
Tipo di errore:
Errore di run-time di Microsoft VBScript (0x800A0005)
Chiamata di routine o argomento non validi
/xmlhttp_2.asp, line 17
la riga 17 è
objopenfile.writeline(mypage)
però se cambio la riga
myURL = "http://forum.ioguadagno.it/elenco.php"
in
myURL = "http://forum.ioguadagno.it/docs/_codingstandards_.htm"
allora tutto funziona regolarmente.
in pratica non riesce a scrivere su file la pagina php che viene richiamata. nessun problema con la pagina htm
perchè?
grazie


Rispondi quotando
