Home  >  Article  >  Backend Development  >  Example of directly calling the content of a text file using a PHP program_PHP Tutorial

Example of directly calling the content of a text file using a PHP program_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:29:591034browse

How to call the content of a text file?




Calling text file content



// While opening the file, print each line
$myFile = file( "data.txt");
for($index = 0; $index < count($myFile); $index++)
{
print($myFile[$index]."
");
}
?>
< /CENTER>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509210.htmlTechArticleHow to call the text file content? HTML HEAD TITLE calls the text file content/TITLE /HEAD BODY CENTER? //Open the file At the same time, print each line $myFile=file("data.txt"); for($index=0;$ind...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn