title: PHP: How to check the access mode of already opened file handler?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5294305/how-to-check-if-a-php-stream-resource-is-readable-or-writable">How to check if a PHP stream resource is readable or writable?</a>  </p>
  </blockquote>
  
  
  
  <p>Does PHP provide any function to check the access mode of file handle?
  Suppose I opened a file in read only mode.</p>
  
  <pre><code> $file_handle = fopen('putty.log','r');
  </code></pre>
  
  <p>Can I check a particular handle's access mode in code?</p>