kefu/server/start.php

27 lines
482 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* swoole 服务端
*/
if(!extension_loaded('redis'))
{
exit("Please install redis extension.\n");
}
if(!extension_loaded('swoole'))
{
exit("Please install swoole extension.\n");
}
if(php_sapi_name() !== 'cli'){
exit("Please use php cli mode.\n");
}
require_once __DIR__ . '/../vendor/autoload.php';
// 加载所有Applications/*/start.php以便启动所有服务
foreach(glob(__DIR__.'/event/*.php') as $start_file)
{
require_once $start_file;
}