bonjour voila je souhaiterais faire un include d'un fichier sur
un autre serveur. Est ce possible?
J'ai essayé ceci et ça ne marche pas

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
<%@LANGUAGE="VBSCRIPT"%>
 
<% ' === INCLUSION ASP ===
 
sub include(fichier)
   dim Fnm,inF,code,asp,pt1,pt2
   ' Création éventuelle de l'objet FSO
   if not isobject(FSO) then _
      set FSO = Server.CreateObject("Scripting.FileSystemObject")
   ' Calcul du path long du fichier
   Fnm = fichier
   ' si le fichier existe
   if FSO.fileExists(Fnm) then
      set inF = FSO.openTextFile(Fnm,1,false)
      ' on lit tout son contenu
      code = inF.readAll
      inF.close
      pt1 = 1 : pt2 = -1
      ' puis c'est selon...
      while pt1>0
         pt1 = instr(pt2+2,code,"<"&"%")
         ' on exécute tout ce qui est entre < % et % >
         if pt1>0 then
            response.write mid(code,pt2+2,pt1-pt2-2)
            pt2 = instr(pt1+2,code,"%"&">")
            asp = mid(code,pt1+2,pt2-pt1-2)
            execute asp
         ' et on affiche le reste
         else
            response.write mid(code,pt2+2)
         end if
      wend
   ' sinon msg d'erreur
   else
      response.write "pas trouvé " & Fnm
   end if
end sub
%>
 
 
<html>
<head>
<title>Cartothèque</title>
</head>
 
<body>
 
	<%
	include"http://10.2.113.30/soti/bib/them.asp"
	%>
</body>
</html>
merci d'avance