Forum Moderators: phranque

Message Too Old, No Replies

How to auto-generate alot of HTML files?

         

PFOnline

8:31 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



I'm building a guitar tab website and I have about 20,000 individual tab files and I need to be able to create an HTML file for each tab file.

The tabs are located on my computer like this for example:

C:\bands\b\beatles\beatles-yesterday.txt

and on my server like this:

www.mydomain.com/b/beatles/beatles-yesterday.txt

The thing that makes this a little difficult is that I need to be able to EXTRACT the file name of each tab (such as beatles-yesterday.txt) and add it to the title tag's and link structure of each html file...

So the end result for this example tab would look like this:

<title>My Sites Name -> Guitar Tabs -> Beatles -> Yesterday tab</title>

Notice how it took the file name and added it to the title tag.

Also, within the tab there would be links that say:

<a href=http://www.mydomain.com>Guitar tabs</a>
<a href=http://www.mydomain.com/b/>Guitar tabs -> B</a>
<a href=http://www.mydomain.com/b/beatles/>Guitar tabs -> B -> Beatles</a>

Then the tab itself would follow.

Does anyone know to go about doing this?

Never done anything like this before, and have no idea how to do it.

PatrickDeese

8:35 pm on Apr 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you looked into a PHP solution?

PFOnline

8:39 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



I really haven't because I'm not sure how to do this with PHP, and I really don't know PHP that well, I know more about perl.

But I suppose I would be willing to learn, if PHP was a way to do this!