如何按属性对网站上的内容进行排序:观看次数最多、评论最多、最受欢迎、评分最高等?
非常基本的问题,我知道......我只是不知道它是如何完成的。
我希望能够按照浏览次数最多、评论最多、最受欢迎、评分最高等方式对网站中的内容进行排序...但我不知道“排序依据”是如何工作的!
应该用哪种脚本语言编写? JavaScript? PHP?可以用XML来完成吗?
我必须设置像 MySQL 这样的数据库吗?有没有好的教程可以解释它?我需要了解其工作原理的确切过程。正如你所看到的,我真的需要指导!
Pretty basic question, I know... I just don't know how it's done.
I want to be able to sort out my content in my websites by most viewed, most commented, most popular, best rating, etc... But I don't know how "sort by" works!
Which scripting language should it be written in? JavaScript? PHP? Can it be done with XML?
Do I have to have a database set up like MySQL? Is there a good tutorial anywhere that explains it? I need to be taught the exact process of how it works. As you can see I really need direction!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要一个 CMS.. 其中有 2 条主要路线可供选择:
如果您选择自己制作,那么需要一个学习曲线。您可能需要学习一些 Javascript、大量 PHP,并准备好手动编写任何 HTML 代码。
这不是一件容易的事,但如果你想这样做,我建议:
我建议初学者使用 MySQL 而不是 XML,尽管您可以从 XML 文件中获得与 MySQL DB 几乎相同的基本功能(MySQL 有许多功能并且更好)总的来说,比 XML 好……但如果您只想将数据存储在平面文件中,则 XML 也可以)。
祝你好运,记住这是提问的地方...所以如果你选择学习 PHP 并且不明白为什么有些东西不起作用,或者不掌握一个概念...请给我们所有人喊一声: )
http://www.php.net <- 有用...
You need a CMS.. Of which there are 2 main routes you can go down:
IF you are choosing to make it yourself then expect a learning curve. You will probably need to learn a bit of Javascript, a lot pf PHP and get ready to hand code any HTML.
It's not an easy task, but if you want to do it I would suggest:
I would recommend MySQL for starters instead of XML, though you can get nearly the same base functionality out of an XML file as a MySQL DB (MySQL has a number of functions and is better overall than XML... but XML will do if you just want to store data in a flat file).
Good luck, and remember this is the place to ask questions... So if you choose to learn PHP and don't understand why something isn't working, or don't grasp a concept... Give us all a shout :)
http://www.php.net <- useful...
听起来您需要一个包含服务器端技术和内容管理系统的内容管理系统。一个数据库。对于初学者,我会推荐 Wordpress 或 Drupal 开始。它们都具有您提到的所有功能,并且在线社区非常出色。
Sounds like you need a Content Management System that incorporates both server-side technology & a database. For a beginner, I would recommend Wordpress or Drupal to get started. they both have all the features you mentioned baked in, and the online community is excellent.
作为一个初学者,我发现 youtube 是一个很大的帮助,如果没有它,当然还有这个网站,我会完全迷失方向。
我发现这个小伙子是最好的http://www.youtube.com/user/phpacademy< /a>
As very much a starter myself I have found youtube to be a great help I would have been completely lost without it, and of course this site.
I found this lad to be one of the best http://www.youtube.com/user/phpacademy