File wrappers are pieces of code that PHP uses to read from and write to different types of files. They are part of PHP’s Streams architecture.
File wrappers allow you to use PHP’s built-in filesystem functions on things that aren’t normal files.
When your PHP script needs to work with a file, you use one of the filesystem functions that PHP provides. These file
system functions hand the work off to the file wrappers. PHP chooses the correct file wrapper based on the name of the file. The file wrapper does the work and passes the
results back through PHP to your script.
PHP comes with a number of built-in file wrappers. Additionally, you can create file wrappers of your own using the PHP Streams API.
- 1089 reads













Post new comment