hi... <% Dim objFolder Set fso=Server.CreateObject("Scripting.FileSystemObject") Set objFolder = fso.GetFolder("C:\Inetpub\wwwroot\CLS1\FA\Uploads") For Each objFile in objFolder.Files Response.Write("<u>" &objFile.Name &"<u><br>") Next For Each objFile in objFolder.subfolders Response.Write("<u>" &objFile.Name &"<u><br>") Next %> PHP: how do i open the files<u>" &objFile.Name &"<u>????? like make it got save and open button
you need to push out the file with response - first you could hit the registry to determine the mime type... then push out the response.content-type as whatever, and it would display the pushed out binary file as whatever type of file it is
Give this a shot: <%Dim objFolder Set fso=Server.CreateObject("Scripting.FileSystemObject") Set objFolder = fso.GetFolder("C:\Inetpub\wwwroot\CLS1\FA\Uploads") For Each objFile in objFolder.Files [INDENT]Response.Write("<u>" &objFile.Name &"<u><br>")[/INDENT] [INDENT]Set ofile = fso.opentextfile(objFile.path, 1, True)[/INDENT] [INDENT]Response.Write("<u>" & ofile.readAll() &"<u><br>")[/INDENT] Next For Each objFile in objFolder.subfolders [INDENT]Response.Write("<u>" &objFile.Name &"<u><br>")[/INDENT] Next %> Code (markup):