This is just a tile server, its purpose is just to serve tiles. You will need a mapping application to access the tiles, something like OpenLayers, Google Maps, LeafletJS. You then tell your mapping API to use tileserver.php to get tiles at the address described in the documentation at github. Github Readme
You should never have to directly access tileserver.php.
Though, nice project, never seen it before. Probably will have to come up with a project to use it...
Because of your earlier question: https://gis.stackexchange.com/questions/42217/creating-tile-server-without-using-any-base-map. My answer needs to be clarified.
Using something like OpenLayers or Leaflet you don't have to use OSM's or Cloudmade's tile service. These applications just provide the framework for developing map applications. You don't have to use any tile service if want (thought it could be hard to read); you could create custom tiles for Middle Earth and use them. There isn't a 'lock-in' on these mapping applications, you can do what you will with them.
In-fact reading from what are asking in these two questions I either don't understand your question or you don't understand the difference between the two systems. Think of it as layers built upon on another.
First you have the tile service, this is the 'map' as most people think of the, tile servers provide tiles that have streets, lakes, parks, etc on them. If you asked the tile servers for their tiles without a mapping application it would just hand you back a bunch of unorganized tiles that wouldn't help you much.
This is where a mapping application like Google Maps, Open Layers, and Leaflet come in. They take all those jumbled tiles, arrange them, stitch them together, and give your controls so you can zoom and pan. All three of these mapping APIs do provide a tile service so you don't HAVE to go looking for tile service, but they do not restrict you from doing so.
As I said, you can create your own tiles, your own 'map', and serve it with tileserver.php. This can be anything you want it to be. In fact you can see this here which uses Google Maps API but is used for creating a 'slippy-map' of World of Warcraft's fantasy-land, Azeroth. ...And yes I do play...
I was able to fix this in mbtiles-php tileserver.php by adding this call:
header('Cache-Control: max-age=3600');
when serving out the image tiles. I have no idea of the wisdom of this, although I did notice that in both the Leaflet and Mapbox examples that I point to above, they have similar 'Cache-Control' HTTP headers on the PNG tiles they serve. Here is the relevant diff:
244a245
> header('Cache-Control: max-age=3600');
259a261
> header('Cache-Control: max-age=3600');
Please let me know if this is a bad idea.
Best Answer
Given 'mbtiles' as the directory, the correct URL to get tiles with Leaflet js is:
As a side note for anyone attempting to use these on an OSGeo4W install, you may need to
AllowOverride
inhttpd.conf
and uncommentextension=php_gd2.dll
in yourphp.ini
file.