Get the permissions for a file or directory in PHP

Description

The following code shows how to get the permissions for a file or directory.

Example



<?php
    echo fileperms("a.php");
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    File »




Directory
DirectoryIterator
Drive
File
File Permission
File Read Save
FileSystemIterator
Path
Zip