TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: BlogFile; ~3000 line, single file PHP blog software

14 点作者 samuellevy大约 13 年前

4 条评论

quadhome大约 13 年前
Other micro (as in code size) blogs:<p>* Blosxom <a href="http://www.blosxom.com/" rel="nofollow">http://www.blosxom.com/</a> (440 lines)<p>* Trivium <a href="https://github.com/chneukirchen/trivium/" rel="nofollow">https://github.com/chneukirchen/trivium/</a> (172-ish lines)<p>* werc <a href="http://werc.cat-v.org/" rel="nofollow">http://werc.cat-v.org/</a> (more like a micro-meta-CMS)
cfinke大约 13 年前
It's an interesting exercise, although the first downside I noticed of the "one file" mantra is that all of the CSS is served inline in every response.<p>Also, you may want to consider handling MySQL errors in a manner other than just printing it to screen along with the query. At the very least, log them somewhere where you'll be alerted of the error. As a user, seeing "MySQLi Error: [...]" doesn't help me or you.<p>It'll be interesting to see if you continue the project and how far you take its functionality. Some of my co-workers were just today discussing the tendency to want to rewrite a system from scratch in order to simplify it and avoid any problems with backwards compatibility, only to slowly find yourself rewriting the "unnecessary" features from which you were trying to escape.
评论 #3937610 未加载
评论 #3937684 未加载
cheald大约 13 年前
Your brute-force protection is:<p>a) bypassable (by simply not sending a session cookie), and<p>b) exploitable to DOS your server (PHP processes are single-threaded so sleep() is basically just a blocking call) - I could just bombard your server with a bunch of login requests to eat up all of the connection slots that end up sleeping for a very long time. You can't serve legit traffic when all of your PHP workers are off sleeping for six hours.
评论 #3937899 未加载
drivebyacct2大约 13 年前
This is scary. All in one file. PHP. CSS/HTML/PHP all in one file.<p>I don't mean to be a jerk, but what problem does this solve, or was it simply a personal challenge/adventure?<p>edit: Some of this is answered on the GitHub page. I guess I'm going to be concerned if someone is worried about how to unzip a file on a server...
评论 #3937592 未加载