
28/07/2007, 08:35
|
(Desactivado) | | Fecha de Ingreso: agosto-2002
Mensajes: 1.458
Antigüedad: 22 años, 9 meses Puntos: 0 | |
Re: ¿Como subir un archivo a servidor? pregunta en el ejemplo :
ublic Sub Guardar(ruta)
Dim oFSO, oFich
Dim i
if ruta = "" or Nombre = "" then Exit Sub
if Mid(ruta, Len(ruta)) <> "\" then '"
'añado la ultima barra a la ruta
ruta = ruta & "\" '"
end if
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
if not oFSO.FolderExists(ruta) then Exit Sub
set oFich = oFSO.CreateTextFile(ruta & Nombre, true)
for i = 1 to LenB(Datos)
oFich.Write Chr(AscB(MidB(Datos, i, 1)))
next
oFich.Close
set oFSO = nothing
End Sub
'------------------------------------------------------------------------
Public Sub GuardarComo(nombrefichero, ruta)
Dim oFSO, oFich, i
if ruta = "" or nombrefichero = "" then Exit Sub
if Mid(ruta, Len(ruta)) <> "\" then '"
'añado la ultima barra a la ruta
ruta = ruta & "\" '"
end if
set oFSO = Server.CreateObject("Scripting.FileSystemObject")
if not oFSO.FolderExists(ruta) then Exit Sub
set oFich = oFSO.CreateTextFile(ruta & nombrefichero, true)
for i = 1 to LenB(Datos)
oFich.Write Chr(AscB(MidB(Datos, i, 1)))
next
oFich.Close
set oFSO = nothing
End Sub
cuando dice : 'añado la ultima barra a la ruta
ruta = ruta & "\"
ahi hay que poner la ruta donde lo va a subir ? y como seria añadir la barra a la ruta ? digamos como se escribiria ?
GRACIAS |