投票类

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/oliver-garfield/vote

v1.0.4 2021-04-17 20:29 UTC

This package is auto-updated.

Last update: 2025-09-18 05:51:35 UTC


README

安装

composer require oliver-garfield/vote

使用

<?php

use OliverGarfield\Vote\VoteFacade;

include_once "vendor/autoload.php";

$config = [
    "ip_nums"=>5 //每个ip可投票次数
];

try
{
    $vote = new VoteFacade($config);
}
catch (Exception $e)
{
}
if(VoteFacade::checkCan())
{
    VoteFacade::setNum();
    // 成功
}
else
{
    // 失败,投票次数已经用尽
}