您如何允许用户在Web应用程序中动态创建网页? [英] How do you allow users to dynamically create a web page within a web app?

查看:91
本文介绍了您如何允许用户在Web应用程序中动态创建网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,当用户向问答网站添加问题时,该问题通常会获得自己的网页,并且该网页是即时创建的。如何使用PHP做到这一点?有人可以指出我任何资源吗?谢谢。

For example, when a user adds a question to a Q&A site, that question typically gets its own web page, and that web page was created on-the-fly. How can you do this with PHP? Could anyone point me to any resources? Thanks.

推荐答案

通过该问题通常具有自己的网页,您指的是具有自己的网址。例如,这是如何允许用户在Web应用程序中动态创建网页?

By "that question typically gets its own web page" you are referring to "gets its own url". For example, this one is How do you allow users to dynamically create a web page within a web app?.

这实际上只是一个把戏。非常简化:

It's really just a trick. Very simplified:

  • When you submitted this question, it got a unique identifier 3723813 and was inserted into a database.
  • There is a single controller script that deals with questions, say https://stackoverflow.com/questions.php
  • When someone tries to open this page, the server knows to send it to questions.php by using a module such as mod_rewrite for apache.
  • Then, questions.php looks at the url parameters, takes the unique id for this question, 3723813, and loads up its information from the database in order to display it.
  • The rest of the url is just cosmetic and just there so that we can right away know what question it is before opening the page.

这篇关于您如何允许用户在Web应用程序中动态创建网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆