12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- class IndexAction extends Action {
-
-
- public function index( ){
- echo 'hello world';
- }
-
-
- public function test( ){
- /*
- $object = new \Qrcode\QRcode();
- $object->png('qweqwe','/data/wwwroot/develop.rltest.cn/1.2.7/czwx/Home/static/image/test.png',3,4);
-
- $reslut = \PHPQRCode\QRcode::png("Test", false, 'L', 4, 2,true);
- var_dump($result);
-
- //echo 'ok';
- exit;
- $qrCode = new Endroid\QrCode\QrCode('Life is too short to be generating QR codes');
- header('Content-Type: '.$qrCode->getContentType());
- echo $qrCode->writeString();
- exit();
- */
- $info = array(
- 'ExpireTime' => time()+600,
- 'LicensePlate' => 'BJ000001'
- );
- $preselect_plate_queue = Redis("wjw_preselect_plate_queue","queue");
- //$result = $preselect_plate_queue -> add($info);
- //var_dump($result);
- var_dump($preselect_plate_queue -> pop());
- exit;
-
- $servers = [
- parse_url(C('REDIS_DSN')),
- ];
-
- $redLock = new RedLock($servers);
- $lock = $redLock->lock('QS000001', 1000, $openid);
- var_dump($lock);
-
-
- }
-
- }
|