%
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 = " Emplacement physique sur le serveur: Le chemin <% = strPathInfo %>
ne correspond pas à un fichier existant sur le serveur.Listing de la page <% = Server.HTMLEncode (strPathInfo) %>
<% if strPhysicalPath <> "" then %>
<% = strPhysicalPath %>"
do while not objFileTextStream.AtEndOfStream
strInLine = objFileTextStream.ReadLine
strOutLine = Server.HTMLEncode (strInLine)
strOutLine = Replace (strOutLine, Chr(9), " ")
Response.Write ("
"
else %>
" & FormatNumber (intRow, 0) _
& " " & strOutLine & " ")
intRow = intRow + 1
loop
Response.Write "