If you encounter a local file inclusion (LFI) vulnerability there is a special technique that enables you to read files from the target system by making use of a PHP wrapper. This will not work in every case but you might want to give it a try.
You can read more about the PHP wrapper on the official php.net site:
This technique basically lets you use PHPs input and output streams as well as apply different filters to them. (http://php.net/manual/en/filters.php)
To read a resource you can use a payload in the form of:
To apply a filter replace filtername with the name of the filter:
In some cases there will be errors depending on the specific implementation and surroundings of the LFI.
A good way do handle these can be to convert the output in a way that will not be interpreted by the target server.
On filter you might want to look at is the
filter that converts the stream data to base64.