如何用php处理用户创建的内容?

Okay, the title isn't really explicit, my bad.

It lame title also explains why I'm probably asking a question that's already been asked - i will gladly accept other (answered) questions as an answer :)

So here's the thing:

I'm currently creating a small community website, and I was wondering how I could handle user-generated content. Everything is ready on the database side (I can store the said content) but I'm struggling on how to display individual pages for each post. I can display a list of them, sure. But how to have one dedicated page for each content that has been generated? Right now, I'm using controllers to render my different pages, and I can probably use them to render pages based on one entry in my database.

The thing is, I plan on integrating social elements such as a facebook 'share' or even facebook comments. I doubt I can use controllers for that in an efficient way.

So, how do you think I should proceed?

Two Methods but only one real technique.

1) Use Unique SEO URLs with htaccess (Apache System) (ie, domain.com/example/... or domain.com/test/...). htaccess separates the portions of the query string and passes it to whatever page you'd like (ie, index?id=example ).

2) Use a unique subdomains for the users. Install a wildcard subdomain *.domain.com then you can create any subdomain (example.domain.com or test.domain.com) which will still be directed to the base index page. From there you can gather the subdomain and extract the content from the database.

These are your two basic methods. 1 is the most popular standard.