Help - Search - Members - Calendar
Full Version: How do I read files names?
HTMLHelp Forums > Programming > Server-side Scripting
dmak
I am building a gallery script for myself and I need some help. Please don't suggest me to use already made gallery scripts. I do not want to argue why.

Lets say my website is...

smile.com/

Smile.com/albums/

So, I created a set of tables where it is only created if there is a folder under ablums. For ex, lets say i have Pokemon under albums. It will create this

CODE

<table>
  <tr>
    <td>
      Pokemon (AKA Box 1)
    </td>
  </tr>
  <tr>
    <td>
      test2
      </td>
  </tr>
  <tr>
    <td>
      test3
    </td>
  </tr>
</table>

So remember my folder was called pokemon. In box 1, I want it to say Pokemon. Let me give 1 more example.

Ok, so now I create a new folder under smile.com/albums/ called Power. Upon creating the folder it will also create (by itself) a new set of tables.


CODE

<table>
  <tr>
    <td>
      Power (aka box 1)
    </td>
  </tr>
  <tr>
    <td>
      test2
      </td>
  </tr>
  <tr>
    <td>
      test3
    </td>
  </tr>
</table>


How can I do this?
Brian Chandler
QUOTE
So, I created a set of tables where *it* is only created if there is a folder under ablums. For ex, lets say i have Pokemon under albums. It will create this


Can't really understand your question. What is the "it" (marked * *) above? How have you created this set of tables, and where are they?

moo
I *think* you want to be able to generate a HTML table for each folder that exists in your filesystem? Any server-side language (such as ASP, JSP, PHP) can be used to traverse directories and output the folder and/or filenames.
dmak
QUOTE(moo @ Jan 11 2008, 07:52 AM) *

I *think* you want to be able to generate a HTML table for each folder that exists in your filesystem? Any server-side language (such as ASP, JSP, PHP) can be used to traverse directories and output the folder and/or filenames.


Exactly! How can I do this?
Darin McGrew
What kind(s) of server-side programs can you run? CGI? PHP? ASP?

What programming experience do you have?

The simplest approach would be to configure your server to generate the index pages automatically. Apache gives you a fair bit of control over what its automatically generated index pages look like.
dmak
I want to use php. It's the most experience I have in out of the languages you listed, but very little experience. I do know a bit of C++.
dmak
OK, scratch everything. I have most of it done now.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.