How to auto-generate alot of HTML files?
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:
My Sites Name -> Guitar Tabs -> Beatles -> Yesterday tab
Notice how it took the file name and added it to the title tag.
Also, within the tab there would be links that say:
Guitar tabs
Guitar tabs -> B
Guitar tabs -> B -> Beatles
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.
kb posted this at 22:01 — 21st April 2004.
He has: 1,380 posts
Joined: Feb 2002
it's called a server-side language template...
I would use PHP
pmj7 posted this at 22:37 — 23rd April 2004.
He has: 234 posts
Joined: Nov 2002
Alternatively, you could generate them all on the fly. For example, your page would be mydomain.com/content.asp?url=b/beatles/beatles-yesterday.txt. Content.asp would parse through the passed url parameter, examine the directories and create whatever is required. No need to create 20,000 additional files. No need to re-create them if you should change your mind about how they look/work. Knowledge of .asp and vbscript or javascript on the server side required. PHP can probably do it as well.
Peter
Touchup image processing applet
Pixel Development Web Design, Photography
kb posted this at 23:46 — 23rd April 2004.
He has: 1,380 posts
Joined: Feb 2002
(note: that's what I said to do with PHP)
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.