str_endsWith is a custom function declared at the start of include/header.php. Need to do this because it wouldn't work with either www.example.com/index.php or localhost/~user/pcinsight/index.php.