whenever you request a webpage you actually get the rendered version
this file...
<?php # functions.php
function login( $params )
{
/// do login
}
?>
when asked for via http://site/functions.php
renders to ... nothing
if you were allowed to do remote includes... then you could simple include my conf file with my database username and password... and print them out to your screen...
so i don't think php has the capability you want...
you could make a seperate file that prints out valid php... but this would make your source publically acessible...
example:
im_remote.php:
<?php
echo "
<?php
\$remotefilename = __FILE__;
?>
";
?>
index.php:
<?php
include 'http://domain/path/to/remote/include/im_remote.php';
$localfilename = __FILE__;
print "<pre>";
print_r($localfilename);
print "<br />";
print_r($remotefilename);
print "</pre>";
?>