Forum Moderators: coopster

Message Too Old, No Replies

[question] Static html output and directory structure.

         

brierleym1

4:19 am on Dec 4, 2006 (gmt 0)

10+ Year Member



Hello Folks.

Just wondering if there is a prepackaged or other solution that will do the following:

Take data from mysql (6 fields, 100 rows)

Open a template file
- replace for example <%PRODUCT DESCRIPTION%> with specific mysql data.
- output .html file and directory structure.

Each row of the database represents a different file and different directory that needs to be created...

ie.

./directory/
./directory/thisone/thisfile.html
./directory/thisone2/thatfile.html
./directory/product/anotherfile.html
.................and so on.

Thanks for your help, let me know if i didnt explain this enough.

omoutop

7:16 am on Dec 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to webmasterworld brierleym1

For the directory structure you wish, mod_rewrite in htaccess can help you (assuming you are using an apache server).

As a general rule, if you have a page that looks like mypage.php?var1=value1&var2=value2 then the mod_rewrite can help you into converting the previous link into something like value1/value2.html or value1/value2/mypage.html.

For more info you can check the apache forum here in webmasterworld.

brierleym1

8:18 am on Dec 4, 2006 (gmt 0)

10+ Year Member



thanks for your reply...

Im looking to actually create the individual file.

Thanks

omoutop

10:18 am on Dec 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



In that case i think the fwrite functin is what you need.

Check [gr2.php.net...] to learn more