Forum Moderators: phranque
That's an interesting question. My first thought was no, but then I thought about the FileSystemObject of ASP. I know you can create files with it, but I've never tried doing it with a directory structure. I don't see why you couldn't.
That you could do dynamically.
If you're platform is ASP, take a look at www.w3schools.com and their ASP section. They have a good discussion of the FSO
mod_rewrite of apache can acces databases directly, or via a script. Which might be a good choice.
Personally I only EVER use virtual directoreis and files. So you can simpel map via mod_rewrite all accesses to a script which then extracts teh directory information and does the DB lookup.
Best Of Luck
SN
FSO can create all the files and folders and the ADOX is good for pulling out the column names and db structure.
Why not do it this way under Windows (ASP/VBS/or Windows script) and then upload it to your server, this way you dont have to worry about permissions when creating files/folders and the live site is safer from hacks.
I dont think it will be much coding at all , but you may need to create all the folders first, before the files, or run it batch style, because the speed the code executes you may be opening folders that dont yet exist.
You will need the FSO functions like CreateFolder, CreateTextFile.
You could also get away without using adox if you use the getrows() method of the ADO recordset - it gets the data & column names into an array and is much better preformance for large data sets.
ar=MyRecordset.GetRows();
nRecordCount=ArrayLen(ar[1]);
arColNames=ArrayNew(1);
for (field in MyRecordset.Fields) {
ArrayAppend(arColNames, field.Name);
};
Welcome to WebmasterWorld Roosta!