laravel LAN 的 Artisan 服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34855239/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 13:03:24  来源:igfitidea点击:

Artisan server for LAN

laravelserverartisan

提问by Miguel Piedrafita

I want to make LAN server with artisan server. How can I run command like this

我想用工匠服务器制作局域网服务器。我怎样才能运行这样的命令

php artisan serve –-host=192.168.2.20 --port=8000

I tried but I am getting 'Too many arguments.' error

我试过了,但我得到了“太多的论点”。错误

I know I can do this by virtual host. Just wanted to know how to do with artisan server.

我知道我可以通过虚拟主机来做到这一点。只是想知道如何使用工匠服务器。

回答by Miguel Piedrafita

Try copying this:

尝试复制这个:

php artisan serve --host=192.168.1.1 --port=8000

回答by Htet Lin Thu

php artisan serve --host 192.168.2.20 --port 8000

php artisan serve --host 192.168.2.20 --port 8000