Add a line to your Apache handlers like this:
AddHandler application/x-httpd-php txt
That'll cause txt files to be parsed by PHP. However, beware of this, because it will mean that ALL txt files get parsed, slowing down the amount of time it takes to serve them to a user.