How can I quickly set up a RESTful site using PHP without a Framework?
Posted
by Sanoj
on Stack Overflow
See other posts from Stack Overflow
or by Sanoj
Published on 2010-04-10T12:18:27Z
Indexed on
2010/04/10
12:23 UTC
Read the original article
Hit count: 248
I would like to quickly set up a RESTful site using PHP without learning a PHP Framework. I would like to use a single .htaccess
-file in Apache (no mod_rewrite) or a single rule using Nginx, so I easyli can change web server without changing my code.
So I want to direct all requests to a single PHP-file, and that file takes care of the RESTful-handling and call the right PHP-file.
In example:
- The user request http://mysite.com/test
- The server sends all requests to
rest.php
- The
rest.php
calltest.php
(maybe with a querystring).
If this can be done, is there a free PHP-script that works like my rest.php
? or how can I do this PHP-script?
© Stack Overflow or respective owner