Tipo de error:
Microsoft VBScript runtime (0x800A0035)
File not found
/ioweb/archivos_delete.asp, línea 16
Código asp:
Ver original
<%@LANGUAGE="VBSCRIPT"%> <!--#include file="Connec/Conn.asp" --> <!--#include file="_includes/funciones.asp" --> <% Imgs = Trim(rq("img")) ar_id = int(rq("ar_id")) rw(Imgs) rw("<br>") rw(ar_id) 'response.End() If Exist(carpetaImg&"/"& Imgs) Then fso.DeleteFile(Server.MapPath(carpetaImg&"/"&Imgs)) End If Sql = "DELETE FROM ARCHIVOS WHERE ar_id = "& ar_id Set Conn = Server.CreateObject("ADODB.Connection") Conn.open MM_conn_STRING Set RS = Conn.Execute(Sql) Response.Redirect(request.ServerVariables("HTTP_REFERER")) %>
el archivo funciones.asp contiene esta funcion:
Código asp:
Ver original
Function Exist(foto) If fso.FileExists(Server.MapPath(foto)) Then Exist = True Else Exist = False End Function
y en el Conn.asp esta esta variable
Código asp:
Ver original
carpetaImg = "_file"
diagrama de carpetas
Raiz ioweb
--->_files
---->archivos a borrar....
---->archivos a borrar.....
---->archivos a borrar.....
---->archivos a borrar.....
.
.
.
--->Connec
---->Conn.asp
--->_includes
---->funciones.asp
--->archivos_delete.asp