1) { switch($path[1]) { case 'blog': // Only /post was visited with no post specified, redirect if (count($path) === 3) { // Possible directory traversal..? $post = './blog/' . $path[2] . '.post.html'; if(file_exists($post)) { $page = $post; } } break; case 'work': $page = './inc/work.php'; break; case 'music': $page = './inc/music.php'; break; case 'papers': $page = './inc/papers.php'; break; case 'resume': $page = './inc/resume.php'; break; // We could use a default case here for 404 but we can save time putting that in the variable "declaration" } } ?> SeeBeyond
loading

SeeBeyond

this is what i look like

Programmer, musician, extraordinaire*!

GitHub

About

I'm primarily a web developer who dabbles in music when im bored and desktop development when I feel like hating myself. Trying to figure out a way to make it rich while simultaniously keeping all my work open source. Even this website is open source! (MIT Licensed) I like to do dumb, irresponsible things with what little money I acquire. If you would like me to write something dumb or irresponsible be it writing music or writing code, send me an email