Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

PHP Techniques: Working with Files and Directories

via LinkedIn Learning

Overview

This course teaches how to use PHP to work with files and directories.

Syllabus

Introduction
  • Work with files and directories in PHP
  • Using the exercise files on GitHub
1. Working with Files
  • Filesystem basics
  • Relative paths and magic constants
  • Accessing files
  • Reading from files
  • Reading line by line
  • File permissions
  • Writing to files
  • Writing line returns
  • Deleting files
  • Moving the file pointer
  • Examining file details
  • Challenge: Create a log file
  • Solution: Create a log file
2. Working with Directories
  • Directory basics
  • Creating and deleting directories
  • Accessing directory contents
  • Skipping directory entries
  • Pattern matching with glob
  • Challenge: Directory treasure hunt
  • Solution: Directory treasure hunt
3. Accepting User-Uploaded Files
  • Configuring PHP for file uploads
  • Sending files as form data
  • Inspecting uploaded files
  • Moving uploaded files
  • Handling upload errors
  • Setting file permissions
  • Securing file uploads
  • Challenge: Profile photo
  • Solution: Profile photos
Conclusion
  • Next steps

Taught by

Kevin Skoglund

Reviews

4.8 rating at LinkedIn Learning based on 25 ratings

Start your review of PHP Techniques: Working with Files and Directories

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.