1234567891011121314151617181920212223242526272829303132 |
- <?php
-
- // [ 应用入口文件 ]
- namespace think;
-
- define('EXTEND_PATH', __DIR__ . '/../extend/');
-
- ini_set('display_errors', 'on');
-
- if (strpos(strtolower(PHP_OS), 'win') === 0) {
- exit("worker.php not support windows.\n");
- }
-
- // 检查扩展
- if (!extension_loaded('pcntl')) {
- exit("Please install pcntl extension. See http://doc3.workerman.net/appendices/install-extension.html\n");
- }
-
- if (!extension_loaded('posix')) {
- exit("Please install posix extension. See http://doc3.workerman.net/appendices/install-extension.html\n");
- }
-
- define('APP_PATH', __DIR__ . '/../application/');
-
- // 标记是全局启动
- define('GLOBAL_START', 1);
-
- // 加载基础文件
- require __DIR__ . '/../thinkphp/base.php';
-
- // 执行应用并响应
- Container::get('app')->bind('crontab/Crontab')->run()->send();
|