<% const ForReading = 1, _ ForWriting = 2, _ ForAppending = 3, _ _ TristateUseDefault = -2, _ TristateTrue = -1, _ TristateFalse = 0 dim strPathInfo 'Nom de fichier pris dans la requête dim strPhysicalPath 'Nom de fichier traduit en chemin local dim objFSO 'Objet FileSystem dim objFile 'Objet File sur le FSO dim objFileTextStream 'Le flux pour lire le File dim strInLine 'Ligne de texte source dim strOutLine 'Ligne de texte reformatée en HTML dim introw 'Numéro de ligne courant strPathinfo = Request.QueryString ("FileName") if strPathInfo = "" then strPathInfo = "" strPhysicalPath = "" else strPhysicalPath = Server.MapPath (strPathInfo) end if %> Listing de la page <% = strPathInfo %>

Listing de la page <% = Server.HTMLEncode (strPathInfo) %>

<% if strPhysicalPath <> "" then %>

Emplacement physique sur le serveur: <% = strPhysicalPath %>

<% end if %>
"> Lister une autre page:
<% if strPhysicalPath <> "" then set objFSO = CreateObject ("Scripting.FilesystemObject") if objFSO.FileExists (strPhysicalPath) then set objFile = objFSO.GetFile (strPhysicalPath) set objFileTextStream = objFile.OpenAsTextStream (ForReading, TristateUseDefault) intRow = 1 Response.Write "" do while not objFileTextStream.AtEndOfStream strInLine = objFileTextStream.ReadLine strOutLine = Server.HTMLEncode (strInLine) strOutLine = Replace (strOutLine, Chr(9), "    ") Response.Write ("") intRow = intRow + 1 loop Response.Write "
" & FormatNumber (intRow, 0) _ & "" & strOutLine & "
" else %>

Le chemin <% = strPathInfo %> ne correspond pas à un fichier existant sur le serveur.

<% end if end if '-- Finalisation -- objFSO = null strPathInfo = null strPhysicalPath = null objFSO = null objFile = null objFileTextStream = null strInLine = null strOutLine = null %>
Compteur Audean
vertebral