用于创建动态网页的代码是什么 [英] what the code for to create a dynamic webpages
本文介绍了用于创建动态网页的代码是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要一个示例pgm并在网页中显示(获取)来自sql数据库的数据
i want a sample pgm and that shows(take)data from a sql database in the webpage
推荐答案
使用PHP创建的任何内容都是动态的。特别是,根据客户端的请求,您可以进行查询,从数据库中获取数据并使用PHP代码生成整个页面。这就是PHP通常用于的,以及其他服务器端技术。
在阅读一些文档之后,只需尝试执行此操作。请参阅:
http://php.net/manual/en/refs.database .php [ ^ ]。
要格外小心。注意 SQL注入:
http://xkcd.com/327 [ ^ ]。
这里有更详细的解释: http://en.wikipedia.org/wiki/SQL_injection [ ^ ]。
-SA
Anything you create with PHP is essentially dynamic. In particular, on the request from the client side, you can make a query, obtain data from database and generate the whole page in PHP code. This is what PHP is generally used for, as well as other server-side technologies.
Instead of asking for code, just try to do it, after reading some documentation. Please see:
http://php.net/manual/en/refs.database.php[^].
Be extra careful. Be aware of SQL injection:
http://xkcd.com/327[^].
Here is it explained in further detail: http://en.wikipedia.org/wiki/SQL_injection[^].
—SA
这篇关于用于创建动态网页的代码是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文