sp; /*读出调查项目文件中的项目*/
$file_votes=fopen($votes, "r");
$line_votes=fgets($file_votes, 255); /*读出已经记录的调查结果*/
fclose($file_votes);
$single_vote=explode("|", $line_votes); /* 并将数据按指定的字串切开,再将字串传回到数组变量中 */
if ($result!=1) /*如果已经接受了调查*/
{
$file_votes=file($votes, "r");
if ($REMOTE_ADDR == $file_votes[1]) /*检查是不是同一个人*/
{
echo "<center><font color=red>您已投过票了,谢谢您的参与!</font></center>";
exit;
}
/*如果IP不重复,则执行以下程序*/
$ficdest=fopen($votes, "w");
for ($i=0; $i<=count($dataf)-1; $i++)
{
if ($i == $vote)
{
$file_votes=fopen($votes, "r");
$line_votes=fgets($file_votes, 255); /*读出已经记录的调查结果*/
fclose($file_votes);
$single_vote=explode("|", $line_votes); /* 并将数据按指定的字串切开,再将字串传回到数组变量中 */
if ($result!=1) /*如果已经接受了调查*/
{
$file_votes=file($votes, "r");
if ($REMOTE_ADDR == $file_votes[1]) /*检查是不是同一个人*/
{
echo "<center><font color=red>您已投过票了,谢谢您的参与!</font></center>";
exit;
}
/*如果IP不重复,则执行以下程序*/
$ficdest=fopen($votes, "w");
for ($i=0; $i<=count($dataf)-1; $i++)
{
if ($i == $vote)
{
| 对此文章发表了评论 |
