Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary

As it is, PHP 5 has no trouble in the slightest when it comes to dealing with files and directories. As the software continues to improve and more features are added, it may be time to begin porting your code to the much more flexible, object-oriented SPL. As you saw, the SPL can quickly and efficiently take care of any directory issues you may have.

In the meantime, however, you can put the regular PHP means of dealing with files and directories to good use by writing your own classes and then extending them. The functionality involved is quite robust and should enable a solution no matter what the problem entails.

It is important to remember to exception handle any potential trouble spots. When dealing with files, especially on a Linux-based server, it is quite important to keep permissions in mind, both when reading and writing. With a proper contingency plan in place, your code will deal with potential issues in a much more competent manner.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint