-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.php
More file actions
30 lines (23 loc) · 696 Bytes
/
start.php
File metadata and controls
30 lines (23 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
use Illuminate\Database\Capsule\Manager as DB;
$loader = require 'vendor/autoload.php';
$loader->setPsr4('PushWorker\\', './');
$loader->setPsr4('JPush\\', '/vendor/Jpush/jpush/jpush/src/JPush/');
$loader->setPsr4('', __DIR__ . '/vendor/');
$db_conf = require 'push/conf/db.php';
$db = new DB;
$db->setAsGlobal();
$db->addConnection($db_conf);
$db->bootEloquent();
use PushWorker\Worker;
if(strpos(strtolower(PHP_OS),'win') === 0){
exit('not support window!');
}
if(!extension_loaded('pcntl')){
exit('please install pcntl extension!');
}
if(!extension_loaded('posix')){
exit('please install posix extension!');
}
date_default_timezone_set('Asia/Shanghai');
Worker::runAll();