【发布时间】:2015-07-25 17:38:40
【问题描述】:
我正在学习 Laravel 官方课程(目前是第一章“Meet Composer”),但我似乎无法正确理解。在课程中,我被指示在命令行中输入:
php -S localhost:8888 -t public
我应该能够访问 URL:“http://localhost:8888/learning-laravel-5”,但这会给我一个 404 错误。
但是如果我输入这个 URL,我会看到首页,它应该是:http://localhost:8080/learning-laravel-5/public/index.php
我的问题是,我怎样才能看到视频中的首页,按照提供的 URL:http://localhost:8888/learning-laravel-5 ?
我查看了 stackoverflow 上的重复问题,但找不到解决此问题的方法。
编辑:我试图通过 pwd 获取我的绝对路径,它说“/media/sf_sandbox/laracast-4.2”,我现在已经这样做了:“php -S localhost:8888 -t /media/sf_sandbox/ laracast-4.2/公共”。我现在去 localhost:8888 但还是不行。
它说我的文档根目录是 /media/sf_sandbox/learning-laravel-5/public
【问题讨论】: