require_once "slim/vendor/autoload.php";$app = new \Slim\Slim(['debug' => true,'mode' => 'development']);$app->get("/index", function() { echo "Hello Slim World
";});$app->run();
In the native access Localhost/api.php/index has output, but on Ubuntu is incredibly 404 Not Found, this is why?
PS: This framework has less resources ...
Reply content:
require_once "slim/vendor/autoload.php";$app = new \Slim\Slim(['debug' => true,'mode' => 'development']);$app->get("/index", function() { echo "Hello Slim World
";});$app->run();
In the native access Localhost/api.php/index has output, but on Ubuntu is incredibly 404 Not Found, this is why?
PS: This framework has less resources ...
The reason was found because pseudo-static was not set
#nginxroot /Users/jackluo/Works/php/rest; location / { root /Users/jackluo/Works/php/rest; index index.html index.php; try_files $uri $uri/ /index.php?$args; }#apache【1】启动mod_rewrite——去掉#,#代表注释LoadModule rewrite_module modules/mod_rewrite.so【2】修改AllowOverride None为AllowOverride All## Deny access to the entirety of your server's filesystem. You must# explicitly permit access to web content directories in other #
blocks below.#
AllowOverride All Require all granted
Slim frame is still good, with very feeling. http://dighash.com/a simple slim demo~