我想要一个简单的非MySQL PHP脚本,它允许查看者投票或向下投票。如果它必须是由MySQL数据库驱动的,那么这就是它的必要性。理想情况下,不是。如何在php中创建一个简单的up/down php脚本投票?
所以基本上,如果你要查看该页面的源在Web浏览器,它会是这个样子:
<h2>Stack Overflow Is Cool</h2>
<span id="author-info-etc">Written by Ben Dover on 01-01-2012 (+12) | (-3) Total Rank: +9</span>
<p>Once upon a time there was this really cool website called Stack Overflow where amazing people would help answer questions asked by people who destroyed their keyboards by throwing them against their computer screen in an act of utter frustration and despair.</p>
和源文件是这样的:
<span id="author-info-etc">Written by <?php echo $authorname; ?> on <?php echo $pubDate; ?> <?php include ('pagevotescript.php'); ?></span>
莫非有人帮我创建这个PHP脚本?
@deifwud我不知道,我只是一个静态文件类型的家伙。我知道这是跛脚。你说的很明显。我只是通过物理写入.php页面上的文件而不是动态生成或从数据库中调用所有东西。但我明白,在这种情况下,这样做可能是不可能的。 – Garry
@tadman我添加了mysql标签,因为我不反对使用mysql的想法。这可能会出现这种情况,因为我的原始问题已经由其他人编辑,现在看起来就是这样。 – Garry