在此服务器上找不到请求的资源 /。Cloud9 IDE 上的 Laravel

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33861376/
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 12:43:52  来源:igfitidea点击:

The requested resource / was not found on this server. Laravel on Cloud9 IDE

phplaravelcloud9-ide

提问by hello world

hey guys i was following the laravel installation guide for cloud9 IDE hereand when go run the app i get following in the screen shot below enter image description here

嘿,大家好我是继为CLOUD9 IDE的laravel安装指南这里,当去运行,我得到了下面的屏幕截图下面的应用在此处输入图片说明

im still new so my debugging solutions are very limited, does anyone know whats wrong on cloud9 ide?

我还是新手,所以我的调试解决方案非常有限,有人知道 cloud9 ide 有什么问题吗?

回答by wkille

Under the tab called 'PHP - Running' which opens when you click the 'Run Project' button, click on where it says 'Runner: ' (between the green bug icon and 'CWD') and select 'Appache httpd (PHP, HTML)'

在单击“运行项目”按钮时打开的名为“PHP - 运行”的选项卡下,单击“运行程序:”(在绿色错误图标和“CWD”之间)并选择“Appache httpd(PHP、HTML)” )'

After changing that setting I had to log out and back in again to get the project to run, but the problem appeared to be fixed.

更改该设置后,我必须注销并重新登录才能运行项目,但问题似乎已解决。

回答by vikram eklare

I was facing same issue while running ZF application. Actually I was executing following command

我在运行 ZF 应用程序时遇到了同样的问题。其实我正在执行以下命令

php -S 127.0.0.1:80 -t /d/MyProjectRootFolder/

Actually I forgot to add public folder path as

其实我忘了添加公用文件夹路径

php -S 127.0.0.1:80 -t /d/MyProjectRootFolder/public/

This fixed issue for me.

这对我来说是固定的问题。

回答by Nicolás Fuentes

I had the same problem.

我有同样的问题。

In my case, I added next line in routes.phpRoute::resource('image','ImageController');

就我而言,我在routes.php 中添加了下一行Route::resource('image','ImageController');

But, in /publicdirectory, it was /public/imagedirectory.

但是,在/public目录中,它是/public/image目录。

Solution:

解决方案:

change directory's name for: /public/img

更改目录名称:/public/img

or change routes.php: Route::resource('imageSite','ImageController');

或更改routes.php: Route::resource('imageSite','ImageController');

Regards!

问候!