I upload an image. When uploading images, I save the image name and link for this iage in one text file. like this, abc.jpeg, http://google.com
Now I want to display all images with corresponding links using classic asp.
How can I do it?
Please, help.
I used this asp code:
<% For Each FileName in fold.Files Dim Fname Dim strFileName Dim objFSO Dim objTextFile Dim URLString Dim strReadLineText Fname= mid(FileName.Path,instrrev(FileName.Path,"\\")+1) strFileName = "../admin/Links.txt" Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(Server.MapPath(strFileName)) URLString="" Do While Not objTextFile.AtEndOfStream strReadLineText = objTextFile.ReadLine 'response.Write(strReadLineText & "<br>") If strReadLineText<>"" then If Instr(strReadLineText,",")>0 then strReadLineTextArr=split(strReadLineText,",") response.Write(strReadLineTextArr(0)) URLString=strReadLineTextArr(1) end if end if Loop ' Close and release file references objTextFile.Close Set objTextFile = Nothing Set objFSO = Nothing
its display of all images, but the same for all image links. Reads directly the last link from a text file .... What is the problem with my code?
source share