Oh ok I see now.

Try to single quote it.

so <?php include('$id.txt') ?>

PHP can be retarded sometimes...

Let me know if that works for you.