Thin support for the PHP Framework

I just added Slim framework to my website to create an API for relaxation. But I currently have a problem. I wrote this code as a test to check whether the request request will work, but whenever I try to call the url, http://mysite.com/api/rest/hello/max , I get a site not found error . Please tell me what is going wrong?

Slim::init();

Slim::get('/hello/:name', 'hello');

function hello($name) {
    echo "Hello, $name!";
}

Slim::run();
+2
source share
1 answer

You made sure to put the file .htaccessc Slimin the same directory as yours index.php.

+6
source

All Articles