PHP Artisan Serve给出了一个空白页


php artisan serve gives a blank page

我的应用程序文件夹c:/wamp/www/newapp .当我使用 newapp 文件夹中的php artisan serve时,服务器从端口 8000 启动。

当然,当我这样做时,我会关闭WAMP服务器,但是我得到一个空白页!我尝试在newapp/public文件夹中进行test.html,如果我键入localhost:8000/test.html就可以工作,但它不会进入登录页面!

供您参考:当我使用 WAMP 服务器并键入 localhost/newapp/public 时,它会转到登录页面,但在使用 WAMP 时玩routes.php不起作用。

我的问题是,如何使用php artisan serve访问登录页面?

我的Laravel版本是4.2.0。

以下是一些可能的修复方法:

  • 运行composer install
  • 尝试在项目的根目录中运行php -S localhost:8000 -t public/(不确定这是否适用于 Windows(

如果这不起作用,您可以尝试使用宅基地