add web root index.php
fix bugs and errors
add example