I'm trying to set up Fat Free Framework. I have my project in C:/xampp/htdocs/proj1, trying to run with xampp and with php dev server. It works but /test gives an error:
Method Not Allowed HTTP 405 (GET /test)
[C:/xampp/htdocs/proj1/vendor/bcosca/fatfree-core/base.php:1980] Base->error() [C:/xampp/htdocs/proj1/vendor/bcosca/fatfree-core/base.php:1795] Base->call() [C:/xampp/htdocs/proj1/index.php:8] Base->run()
index.php:
<?php
require 'vendor/autoload.php';
$f3 = \Base::instance();
$f3->config('routes.ini');
$f3->set('DEBUG', 3);
$f3->set('AUTOLOAD','./App/');
$f3->route('GET /t', function() {echo 'test';});
$f3->run();
routes.ini:
[routes]
GET /test = Test->hw
.htaccess:
Options -Indexes
RewriteEngine On
RewriteRule ^(app|dict|ns|tmp)\/|\.ini$ - [R=404]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
App/Test.php:
<?php
class Test {
public function hw($f3) {
echo 'HW!';
}
}
Any ideas? I'm relatively new to this so sorry if i'm missing something relevant here.
I'm trying to set up Fat Free Framework. I'm trying to setup routes and run with xampp/php dev server, getting 405 while navigating to url that routes to a function in a different php file.