PHP code example of oliver-garfield / vote

1. Go to this page and download the library: Download oliver-garfield/vote library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oliver-garfield / vote example snippets




use OliverGarfield\Vote\VoteFacade;

投票次数
];

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