Jump to content

Folder Contents and File Details


PrateekSaxena

Recommended Posts

Hello,Is there any function in PHP that allows me to get all the contents of the file. And along with the contents their details like the date of creation and last modification, the type of file etc.

Link to comment
Share on other sites

You can get the contents of a file with file_get_contents();All sorts of details can be gathered about the file with the following functions:fileatime() - Returns the last access time of a filefilectime() - Returns the last change time of a filefilegroup() - Returns the group ID of a filefileinode() - Returns the inode number of a filefilemtime() - Returns the last modification time of a filefileowner() - Returns the user ID (owner) of a filefileperms() - Returns the permissions of a filefilesize() - Returns the file sizefiletype() - Returns the file typeAlso have a look at the W3Schools PHP filesystem reference: http://www.w3schools.com/php/php_ref_filesystem.asp

Link to comment
Share on other sites

You can get the contents of a file with file_get_contents();All sorts of details can be gathered about the file with the following functions:fileatime() - Returns the last access time of a filefilectime() - Returns the last change time of a filefilegroup() - Returns the group ID of a filefileinode() - Returns the inode number of a filefilemtime() - Returns the last modification time of a filefileowner() - Returns the user ID (owner) of a filefileperms() - Returns the permissions of a filefilesize() - Returns the file sizefiletype() - Returns the file typeAlso have a look at the W3Schools PHP filesystem reference: http://www.w3schools.com/php/php_ref_filesystem.asp
Hey..thanks a lot for that link. And about getting the contents of the folder?
Link to comment
Share on other sites

Just what I wanted man. Thanks a lot!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...