We need a new method to access files inside modules (see #1442)
I'm thinking, eg, direct.php/phpinfo/logfiles or something like that (using PATH_INFO, just to make things simple), along with a handler function inside the module, phpinfo_direct($param), where 'logfiles' gets passed as $param. Then the handler function can do whatever it wants - display the contents of a file, or generate output.
If the function returns true, then direct.php will wrap the output in the usual header/footer (but no menu).. otherwise, it just displays the output directly (which would allow the function to return an image, or any other content-type with appropriate headers).