Opening file on File Handling in PHP
fopen( ) – This function is used to open a file or URL.
Syntax:-
fopen(filename, mode, include_path, context)
File name – It is the name of file or url.
Mode – in which mode we want to open this file ex: – r, w etc.
Include_path – Set this parameter to ‘1’ or TRUE to specify that you want to search for the file in the PHP include path.
Context – Contexts modify or enhance the behavior of the data stream from and to files.
If the open operation fails, it returns FALSE and an error on failure.
Example:-
Latest posts by Ashwani Kumar (see all)
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023