doujumiao5024 2015-09-11 16:56
浏览 3
已采纳

如何用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?

  • 写回答

1条回答 默认 最新

  • dongxu1875 2015-09-11 17:47
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。