Reputation: 9857
I am not a php expert. However I am in need of building a simple rest service, mainly with GET request to be used with a mobile application.
I have read something about Slim Framework, and tried to implement a simple example.
While I am not getting any error, it also seems that the function is not being called.
This is the source:
<?php
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->get('/ping', function () {
echo "Works !!!";
});
$app->run;
I didn't do anything on .htaccess so I am calling like this:
http://mywebsite/services/service.php/ping
index.php is called with status 200 as I can see from logs, but I am getting no output at all.
I tried several servers and getting same results. Obviously I am missing something.
Upvotes: 0
Views: 699
Reputation: 3046
Not having used Slim, I'm going to make a guess and say $app->run
should be $app->run();
Upvotes: 1