关于向静态网站添加基本动态行为的建议
我正在为本地企业开发一个网站,并且已经在 Photoshop 中完成了设计和布局,现在我准备开始创建 HTML 和 CSS。我正在尝试决定在服务器端使用哪种技术来实现以下基本动态行为:
- 在所有页面上包含站点页眉和页脚,而不必将代码放在所有源文件中(例如服务器-侧面包括)。
- 允许用户通过网络界面编辑几个页面并发布更改。
- 有反馈/调查表。
通过当前的网络主机提供的解决方案有:PHP、ASP、ASP.NET 2.0、Drupal、Joomla 和 Wordpress。
您认为什么是一条好的(简单的)路径?我有 VB.NET 和 C# 的经验(但没有 ASP.NET)。我愿意学习最适合这项工作的工具。
谢谢!
I'm developing a site for a local business and I've finished the design and layout in Photoshop and now I'm getting ready to start creating the HTML and CSS. I'm trying to decide which technology to use on the server-side to achieve the following basic dynamic behavior:
- Include the site header and footer on all pages without having to have the code live in all of the source files (like a server-side include).
- Allow for the user to edit a few pages via a web interface and publish changes.
- Have feedback/survey forms.
The solutions available through their current webhost are: PHP, ASP, ASP.NET 2.0, Drupal, Joomla, and Wordpress.
What do you think would be a good (read: easy) path to take? I have experience with VB.NET and C# (but not ASP.NET). I'm open to learning whichever tool would be best for the job.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从所有方面来说,PHP 都能完美地工作。对于页眉和页脚包含内容,您可以有一个接受目标页面的 GET 变量的页面(例如:“主页”、“日历”、“新闻”...)。根据您收到的 GET 变量,您可以包含不同的页面。
if($_GET['page']=="home"){
包括(inc/home.php);
如果您不想
在 URL 中显示丑陋的 GET 变量,您可以使用一些 apache 魔法来美化它们! (谷歌搜索“url masking”或“apache redirect”应该可以解决问题)
至于您的其余要求,PHP 的优点是学习曲线小,并且有大量可用文档(在线和离线)。 PHP 和 MySQL 的组合应该足以满足您的需求。大多数网络主机都提供这些。
For all points PHP would work beautifully. For your header and footer inclusions, you can have a single page that accepts a GET variable of the target page (ex: 'home', 'calendar', 'news'...). Depending on what GET variable you receive, you can include different pages.
if($_GET['page']=="home"){
include(inc/home.php);
}
If you don't want to display the ugly GET variables in the URL, you can pretty them up with some apache magic! (Googling 'url masking' or 'apache redirect' should do the trick)
As for the rest of your requirements, PHP has the advantage of a small learning curve, and a large amount of documentation available (both online and off). A combination of PHP and MySQL should be sufficient for what you require. Most webhosts offer these.
如果你没有任何这些方面的经验,那这将是一场糟糕的拍摄! Drupal、Joomla、Wordpress 或任何其他开源 CMS 可能会为您提供您想要的功能(以及更多),而无需学习编程语言。阅读他们的功能列表和几个教程,了解如何完成每个教程中的基本任务。如果他们不具备您需要的灵活性或功能,您可能必须学习一种编程语言(在这种情况下,就我个人而言,我会远离微软特定的选项 - 您的下一个客户端可能不会运行 Windows机器,您的投资将被浪费)。
祝你好运!
If you don't have experience in any of these, it's going to be a crap shoot! Drupal, Joomla, Wordpress or anyother open source CMS is probably going to give you the features you want (and more) without having to learn a programming language. Read their list of features a couple of tutorials to see how you would accomplish basic tasks in each. If they don't have the flexibility or power you need, you'll likely have to learn a programming language (in which case, personally, I'd stay away from the microsoft-specific options - your next client may not be running windows machines and your investment will be wasted).
Good luck!