Ask a Question related to ASP Components, Design and Development.
-
Marco Pais #1
File Listing
Hi there.
First of all, sorry for my poor english.
I have a problem that I don't know how to resolve. I want to make a dynamic
image gallery. With an ASP script, I will read the images from a folder and
display them on a table, for example. The script is something like this:
<%@ Language=VBScript %>
<HTML>
<BODY>
<%
Dim objFileScripting, objFolder
Dim filename, filecollection, strDirectoryPath, strUrlPath
strDirectoryPath="c:\inetpub\scripts\"
strUrlPath="\scripts\"
'get file scripting object
Set objFileScripting = CreateObject("Scripting.FileSystemObject")
'Return folder object
Set objFolder = objFileScripting.GetFolder("c:\inetpub\scripts\")
'return file collection In folder
Set filecollection = objFolder.Files
'create the links
For Each filename In filecollection
Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
Response.Write "<A HREF=""" & strUrlPath & filename & """>" & filename
& "</A><BR>"
Next
%>
</BODY>
</HTML>
This one is not finihed yet (read only images and display them on a table).
But my problem is this: what can I do so I can read 10 files each time,
separated in several pages. So, if I have 100 image files in my folder, I
will have 10 pages, each one with a table conatining 10 images.
Thanks for any help.
Regards,
Marco Pais
Marco Pais Guest
-
#39481 [NEW]: I have got file listing of /
From: zxc at zmail dot ru Operating system: FreeBSD 6.1 PHP version: 4.4.4 PHP Bug Type: *Directory/Filesystem functions Bug... -
Listing
Hello, I am just working on a text where I need to use listing symbols like in MS Word (dash oder points). But I cannot find anything like that in... -
Listing absolute path of file
In article <1069154646.787003@internet.fina.hr>, Pipiron wrote: This will do it recursively: find /path/to/dir -print -- -
How to get a remote file listing in PHP
I was running into a problem where I needed a PHP function to get the directory listing of a remote HTML directory. I scoured posts and a few said... -
.htaccess file to prevent listing of directories.
I created a .htaccess file to prevent people from browing some of my directories. The file contained: IndexIgnore *.gif *.jpg When I then go... -
McKirahan #2
Re: File Listing
"Marco Pais" <marco.pais@[IGNORE]gmail.com> wrote in message
news:Obuf1xz0GHA.1588@TK2MSFTNGP02.phx.gbl...dynamic> Hi there.
>
> First of all, sorry for my poor english.
>
> I have a problem that I don't know how to resolve. I want to make aand> image gallery. With an ASP script, I will read the images from a folderfilename> display them on a table, for example. The script is something like this:
>
> <%@ Language=VBScript %>
> <HTML>
> <BODY>
> <%
> Dim objFileScripting, objFolder
> Dim filename, filecollection, strDirectoryPath, strUrlPath
> strDirectoryPath="c:\inetpub\scripts\"
> strUrlPath="\scripts\"
>
> 'get file scripting object
> Set objFileScripting = CreateObject("Scripting.FileSystemObject")
> 'Return folder object
> Set objFolder = objFileScripting.GetFolder("c:\inetpub\scripts\")
> 'return file collection In folder
> Set filecollection = objFolder.Files
> 'create the links
> For Each filename In filecollection
> Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
> Response.Write "<A HREF=""" & strUrlPath & filename & """>" &table).> & "</A><BR>"
> Next
> %>
> </BODY>
> </HTML>
>
> This one is not finihed yet (read only images and display them on aYou might consider having one page generate the multiple pages of pictures> But my problem is this: what can I do so I can read 10 files each time,
> separated in several pages. So, if I have 100 image files in my folder, I
> will have 10 pages, each one with a table conatining 10 images.
along with an "include" file that identifies these pages; the "include"
would
be part of another page that from which the images pages could be selected.
Whenever images are added to or removed from the folder then you (not
your visitors) would regenerate the static pages and the "include" file.
Are all of the images in the folder the same dimensions? If not, do you
want them all displayed with the same width -- to ensure that they'll all
fit on a page without requiring horizontal scrolling by the visitor?
Note -- you could use "filename.Name" instead of extracting the it via:> Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
McKirahan Guest



Reply With Quote

