初始化代码
This commit is contained in:
35
application/common/command/ZxLastRank.php
Normal file
35
application/common/command/ZxLastRank.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class ZxLastRank extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('zx-last-rank')
|
||||
->setDescription('上周周星榜'); //
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理过期装扮
|
||||
* @param Input $input
|
||||
* @param Output $output
|
||||
* @return int|void|null
|
||||
* @throws \think\Exception
|
||||
* @throws \think\exception\PDOException
|
||||
*/
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "http://180.188.36.65:913/api/api/last_week_rank");
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_exec($ch);
|
||||
echo '上周周星榜!'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user