- PHP Basics
- Learn PHP
- PHP Comments
- PHP Data Types
- PHP Variables
- PHP Operators
- PHP echo
- PHP print
- PHP echo vs. print
- PHP if else
- PHP switch
- PHP for Loop
- PHP while Loop
- PHP do...while Loop
- PHP foreach Loop
- PHP break and continue
- PHP Arrays
- PHP print_r()
- PHP unset()
- PHP Strings
- PHP Functions
- PHP File Handling
- PHP File Handling
- PHP Open File
- PHP Create a File
- PHP Write to File
- PHP Read File
- PHP feof()
- PHP fgetc()
- PHP fgets()
- PHP Close File
- PHP Delete File
- PHP Append to File
- PHP Copy File
- PHP file_get_contents()
- PHP file_put_contents()
- PHP file_exists()
- PHP filesize()
- PHP Rename File
- PHP fseek()
- PHP ftell()
- PHP rewind()
- PHP disk_free_space()
- PHP disk_total_space()
- PHP Create Directory
- PHP Remove Directory
- PHP Get Files/Directories
- PHP Get filename
- PHP Get Path
- PHP filemtime()
- PHP file()
- PHP include()
- PHP require()
- PHP include() vs. require()
- PHP and MySQLi
- PHP and MySQLi
- PHP MySQLi Setup
- PHP MySQLi Create DB
- PHP MySQLi Create Table
- PHP MySQLi Connect to DB
- PHP MySQLi Insert Record
- PHP MySQLi Update Record
- PHP MySQLi Fetch Record
- PHP MySQLi Delete Record
- PHP MySQLi SignUp Page
- PHP MySQLi LogIn Page
- PHP MySQLi Store User Data
- PHP MySQLi Close Connection
- PHP Misc Topics
- PHP Object Oriented
- PHP new Keyword
- PHP Cookies
- PHP Sessions
- PHP Date and Time
- PHP GET vs. POST
- PHP File Upload
- PHP Image Processing
PHP File Handling (I/O)
This article is created to cover all about file handling in PHP.
While creating a web application using PHP, we may need to create, update, modify, or delete information using files. Therefore, we need to understand how a file can be handled using/in PHP.
Most Important File Handling Topics in PHP
- Open a File
- Create a File
- Write Data/Text into a File
- Read Data/Text from a File
- Append Data/Text into a File
- Close a File
- Copy Content of One File to Another
- Find Free Space
- Find Total Space
- Find Size of File
- Rename a File
- Create a Directory
- Remove a Directory
- List All Files/Folders
- Delete a File
Since it is not possible to cover all the topics related to file handling, in one single article. Therefore I have divided file handling topics into its separate tutorials.
Either you can directly visit any of the above topic, to learn that particular one, or follow the step by step process, to learn all the things about file handling in PHP. That is, from next chapter, the tutorial of file handling starts. You can visit next chapter, by clicking on the Next Tutorial button/link right after the completion of this article.
« Previous Tutorial Next Tutorial »