si può fare un include da altro server????
grazie a tutti
si può fare un include da altro server????
grazie a tutti
oppure con xmlhttp
Originariamente inviato da lukeonweb
![]()
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
corwin me ne sono accorto che non si può fare tu mi sai per caso dire come?
set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlhttp.Open "GET", "http://www.html.it", false
xmlhttp.Send
response.write xmlhttp.responsetext
set xmlhttp = nothing
Il problema sono le immagini e i link, perchè se non sono degli url assoluti non funzionano correttamente.
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
Per usare la direttiva Include="http:// devi avere una classe che interpreta questa direttiva (baol.cjb.net)...
L'altervativa è appunto l'uso di msxml. La limitazione è che per leggere un file direttamente non puoi dargli l'estensione asp altrimenti viene interpretata dal server.
Per superare il problema puoiimplementare un servizio web anche rudimentale per farti restituire la pagina con estensione asp.
Ciao
grazie baol e grazie corwin
ho un paio di punti non chiarissimi:
xmlhttp.Open "GET", "http://www.sassarinet.net/sh/file.inc", false
1)devo dare il percorso assoluto del mio file
2)devo mettere qualkosa nel file di richiamo?
response.write xmlhttp.responsetext
qua cosa ci devo mettere ilnome del file
scusate se vi stresso ma è fondamentale per me grazie
Scusa ma no capisco dove sia il problema...
invece di mettere "http://www.hmtl.it" ci metti L'URL completo al file che ti interessa. Il resto rimane uguale.
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up