Forum Moderators: coopster
I have a database of parts that I've written a script to create html files from the information and insert it into directories based on subCategory fields in that rows info. That script works fine, but now I need to create another script that automatically creates an index.html file in each of those directories, and uses the information from the database to create links on the index page to what it should have. I'm not sure if I'm explaining this properly, but here is an example of what I want to do
After running my initial parts script, I have a structure like so:
root/manufacturer/category/
the root/manufacturer/ folder will sometimes have parts, so it's index file needs to display links to those parts, and also links to the index.htm in each of the category subfolders, which in turn would display links to their parts. I know all the fwrite stuff, for displaying the links, but I can't figure out how to accomplish getting the index files written.
any tips/suggestions on areas where I should be reading up on would be greatly appreciated.
[edited by: rXL3 at 2:10 pm (utc) on Oct. 31, 2007]
I'm not sure how you have everything laid out in the database but can you make the index page from the information in there? All you'd have to do is loop through the results and print the information accordingly. If not, you should be able to loop through the directories and grab the structure and put it into a navigation form on the index page by using the directory functions [us2.php.net].