Replaced mimetype check by extension check, and displayed parent directory properly
-rw-r--r-- 3391 index.php
-rw-r--r-- 2372 view.php