Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ How do I read files names?

Posted by: dmak Jan 11 2008, 04:24 AM

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?

Posted by: Brian Chandler Jan 11 2008, 05:31 AM

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?


Posted by: 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.

Posted by: dmak Jan 11 2008, 02:36 PM

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?

Posted by: Darin McGrew Jan 11 2008, 03:00 PM

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.

Posted by: dmak Jan 11 2008, 03:07 PM

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++.

Posted by: dmak Jan 11 2008, 06:34 PM

OK, scratch everything. I have most of it done now.


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)