Gettin filename from file resource

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Gettin filename from file resource

Post 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.
Post Reply