这是windows启动的 bat文件:
`php index.php Workerman/index
pause`
这是centos7上的启动命令:
框架是用的 thinkphp框架,楼主请问这怎么解决??
这是windows启动的 bat文件:
`php index.php Workerman/index
pause`
这是centos7上的启动命令:
框架是用的 thinkphp框架,楼主请问这怎么解决??
主次颠倒了吧。
workerman相当于nginx,怎么可能在thinkphp上启动nginx呢。
应该是,启动workerman的webserver,将tp目录作为根目录
require_once __DIR__ . '/vendor/autoload.php';
use Workerman\WebServer;
use Workerman\Worker;
// WebServer
$web = new WebServer("http://0.0.0.0:80");
// 4 processes
$web->count = 4;
// Set the root of domains
$web->addRoot('www.your_domain.com', '/your/path/Web');
$web->addRoot('www.another_domain.com', '/another/path/Web');
// run all workers
Worker::runAll();
1 回答4.1k 阅读✓ 已解决
3 回答1.9k 阅读✓ 已解决
2 回答2.3k 阅读✓ 已解决
1 回答1.4k 阅读✓ 已解决
2 回答2.2k 阅读
1 回答624 阅读✓ 已解决
802 阅读
Linux 上 php 命令不是这么用的。
同样的问题,看这篇:https://blog.csdn.net/lihuanl...