What is the use of file in php?
For instance, if I have a file that contains this:
Hello
This
Is
My
File
Then this is how the file function returns it:
<?php
$contents = file("myfile.txt");
print_r($contents);
?>
which prints
Array
(
[0] => Hello
[1] => This
[2] => Is
[3] => My
[4] => File
)
Ask a Question / Comment on this Question and Answer >>>
More files PHP Questions
HOW CAN I VIEW THE WORD DOCUMENT IN THE PHP PAGEWhere is a text file i created kept?
How do I open a file to write content to?
What does file_get_contents do?
How can i upload large files like mp3 songs using php?
