kalaba2003
kalaba2003

Reputation: 1229

How to design php file with many folders?

I have a book site and want to create folders for every book.For example,

www.mydomain.com/book1  
www.mydomain.com/book2
www.mydomain.com/book3  

Every book page will be same format and only book names and authors etc. will change by fetching data from database. So, creating an index.php file and copying it all book folders is my idea. And index.php can be:

include "include_book_format.php";  

So, format of book pages will be in "include_book_format.php".
Is that a good design or is there any way to create it more efficiently? Thanks...

Upvotes: 0

Views: 71

Answers (1)

dynamic
dynamic

Reputation: 48141

You want create real folders? I don't think you need it.
You can use Rewrite Engine http://kb.mediatemple.net/questions/85/Using+.htaccess+rewrite+rules

Upvotes: 5

Related Questions