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();
source
share