Page 1 of 1

Gettin filename from file resource

Posted: Fri Jun 27, 2003 10:49 am
by jason
Okay, here is the situation, and a bit of code:

Code: Select all

<?php

$fp = fopen("File.php", "r");

?>
Now, from here, I would I get the file name of the file that $fp is a resource for (in this case, File.php). fstat() of course doesn't do it. Is their a way to get the filename that I am just over looking?

Also, just to be clear, we only have the file resource to work from, and no other information.

I just can't seem to find anything on it, so either my googling has failed me this time, or it just doesn't exist.