The Requested Resource / Was Not Found on This Server Php

I ran the php server on cmd using php -S localhost:8080, like this:

And I got this problem opening the localhost:

What do I supposed to do?

2

6 Answers

I was missing index.php in the root folder.

This error also occurs when you have a path with the same name as a directory in the public folder:

Definition of path in the file routes.php

    Route::get('Glaciares',function(){
        return view('Principal.Glaciares.Acerca');
    });

Public folder

2

I got the same problem which occurred by running the php -S localhost:8002 in the wrong directory.

Project/src/ -> caused the error

Project/src/public -> Solved

2

Save the error blade file in another name and set the route in that name. eg:

 index.blade.php save welcome.blade php

Route:

Route::get('/welcome', function () {
    return view('welcome');
});

in rails, Missing

def index

end 

in your controller.

if not, restart your computer and everything is fine

error resolved image

I personally solved this error by putting my file name after like this, you can see the results in the image above

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest