Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Čitanje svih slika iz foldera?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
Peewee



Joined: 12 Jan 2004
Posts: 711
Location: Velika Gorica

PostPosted: 01.02.2005 01:43    Post subject: Čitanje svih slika iz foldera? Add user to your forum ignore list Reply with quote

Code:

<%
  Dim objFSO
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

  Dim objFolder
  Set objFolder = objFSO.GetFolder(Server.MapPath("img/"))

  Dim objFile
  For Each objFile in objFolder.Files
%>
  <a href="<% = objFile.Path %>"><img border="0" src="<% = objFile.Path %>" ></a>
<%
  Next
%>


probo ovako radi lokalno ali na serveru ne uzima url vec fizičku adresu do filea pa ne radi... pa probo maknut Server.MapPath i stavit URL pa neće kaže da ne postoji path pa probo samo img/ pa opet ista stvar... kako bi mogo pročitat sve slike iz foldera uz pomoć asp-a ili asp.neta po mogućnosti bez upisivanja u bazu....hvala svima koji će sudjelovati Wink

_________________
Pi (Pee) is a mathematical constant equal to approximately 3.14.
zivili!!!
Back to top
View user's profile Send private message Visit poster's website
Peewee



Joined: 12 Jan 2004
Posts: 711
Location: Velika Gorica

PostPosted: 01.02.2005 02:06    Post subject: Add user to your forum ignore list Reply with quote

rijesio sam problem ovako
Code:

<a href="<% = "img/" & objFile.Name %>"><img src="< % = "img/" & objFile.Name %>">

_________________
Pi (Pee) is a mathematical constant equal to approximately 3.14.
zivili!!!
Back to top
View user's profile Send private message Visit poster's website
imbrod
Guest





PostPosted: 03.02.2005 16:18    Post subject: Reply with quote

Inace ti je u 4. liniji bio problem:

Set objFolder = objFSO.GetFolder(Server.MapPath("/img/"))

jer metoda MapPath mora izracunati path od korjenskog direktorija, sebi prevesti u apsolutni path na disku na serveru
Back to top
Peewee



Joined: 12 Jan 2004
Posts: 711
Location: Velika Gorica

PostPosted: 03.02.2005 23:58    Post subject: Add user to your forum ignore list Reply with quote

to sam skuzio pa sam zato i stavio ovako.... hvala svejedno

_________________
Pi (Pee) is a mathematical constant equal to approximately 3.14.
zivili!!!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group