Possible Duplicate:
In PHP, after assigning a file pointer resource to a variable with fopen(), how can I get the file name from the variable?
Example:
$this->resource = fopen('c:\wamp\www\some_file.txt', 'a');
Now if I try to access $this->resource later, in a different method I get:
Resource id #51: stream
Can I get the actual file path too?
in addtitional aswer with voodoo417, you can get info about the file like this
———————- OUTPUT ————————-
//from php.net
also see fileinfo extention.