I\'m currently working on an internal RESTful API, and I\'m using our main domain name as an environment identifier. However, I noticed that Slim
I've just added this to the top of router script (index.php in my case):
if (PHP_SAPI === 'cli-server') { $_SERVER['SCRIPT_NAME'] = pathinfo(__FILE__, PATHINFO_BASENAME); }
Usage example:
$ php -S localhost:8080 -t public index.php