PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

DevShed: File Security and Resources with PHP

Note: This article was originally published at PHPDeveloper on 24 November 2011.
PHPDeveloper

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.