hola foro
estoy accediendo a un fichero de texto tipo txt, con este codigo....
Código:
<%
Const ForReading = 1
Const format = 0
Const Create = False
Dim FSysObj
Dim TS
Dim strLine
Dim strFileName
'ftexto=RS("critica")
if ftexto<>"" then
'nombre del fichero a mostrar
strFileName = Server.MapPath("datos/criticas/"&ftexto&".txt")
'Creación del objeto FileSystemObject
Set FSysObj = Server.CreateObject("Scripting.FileSystemObject")
' Abrimos el fichero
Set TS = FSysObj.OpenTextFile(strFileName, ForReading, Create, format)
If not TS.AtEndOfStream Then
Response.Write "<p align='left' class='textos_criticas'>"
Do While not TS.AtendOfStream
' Leemos el fichero linea a linea y lo mostramos
strLine = strLine + TS.ReadLine & chr(13)
'strLine = TS.ReadLine & chr(13)
'Response.Write i & " " & Server.HTMLEncode(strLine) & "<br>"
loop
End If
'cerramos y destruimos los objetos
TS.Close
Set TS = Nothing
Set FSysObj = Nothing
end if
%>
Este codigo funciona perfectamente con el PWS en win98.
Cuando lo pruebo en Win2000 y con IIS , no funciona. por que... no lo se.
Alguien me puede ayudar..
Puede ser algo de permisos.....
Un saludo.
RufinoLM
:cantar: :cantar: