Flat File Text Database System Display Content

Published :
Author :
Adam Khoury
In this 2 part video series we demonstrate using .txt flat file database systems as an alternative to MySQL, XML, or other database systems. In this part 1 you will learn 2 methods for displaying and accessing external text files within your PHP scripts. <?php if (file_exists("file1.txt")) { // Method 1 for displaying external text file data // include_once "file1.txt"; // Uncomment this line to use // Method 2 for displaying external text file data(preferred) $myData = file_get_contents("file1.txt"); } echo $myData; ?>