What function is used to open a file in PHP?
- open()
- fopen()
- read()
- include()
In PHP, the fopen() function is used to open a file. It takes the path to the file and the mode as parameters. This function returns a file handle or pointer that can be used for file operations, such as reading or writing data.
Loading...
Related Quiz
- Which of the following are differences between variables and constants in PHP?
- You need to use the $this keyword in your PHP script. How would you do this?
- You have a PHP script and you need to create an object from a class. How would you do this?
- What is an associative array in PHP?
- What is the difference between the 'BITWISE AND' operator and the 'LOGICAL AND' operator?