Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
File Security and Resources with PHP
Nov 23, 2011 @ 16:23:27

In the fourth part of their series looking at working with the filesystem in PHP, DevShed has posted a new tutorial focusing on security and permission handling for files/resources.

These days, security is paramount to any server installation, large or small. Most modern operating systems have embraced the concept of the separation of file rights via a user/group ownership paradigm, which, when properly configured, offers a wonderfully convenient and powerful means for securing data. In this section, you'll learn how to use PHP's built-in functionality to review and manage these permissions.

They introduce functions like:

Sample code is also included to show how to open and close a file.

tagged: file security resource permissions function tutorial

Link: