I have the slim (http://www.slimframework.com/) directory unpacked in
http://example.com/api/
and I have the index.php file looking as such:
<?php
require 'Slim/Slim.php';
Slim::init();
Slim::get('/hello/:name', function ($name) {
echo "Hello $name";
});
Slim::run();
?>
but when I try to access the GET method, The browser returns something like:
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
And I have no idea why it’s not working.
Help?
Thanks in advance.
Turns out the solution to this problem was HTTP version number within Slim’s package.
I changed this line
to
and all was well.
Cheers, thanks for the help.