What is Filesystem file in PHP
In this article I am going to explain about file function in PHP.
PHP file() function
The filesystem file function is used to reads entire file into an array.
Syntax of file function
file(filename, includePath, context) |
Parameters in file function
It have three parameter:
Parameter |
Description |
path |
It specifies the file to read. |
includePath |
IncludePath specifies a search file. |
context |
It specifies the context of the file handle. |
Example of filesystem file function
<html>
<body>
<?php
print_r(file("C:\wamp\www\Dinesh\PhpIntro.txt"));
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here