Storing Data in Text Files

chinmay.sahoo

New member
Although the topic of storing information in and retrieving it from a database will be covered in detail in later chapters of this book, the use of plain text fi les on the server to store data of a fairly basic kind is well worth knowing about and for newcomers to PHP has the advantage of avoiding the need to learn another language (mySQL or something similar) at the same time as learning PHP .

Note that although it is not possible to use a web browser to access fi les such as fi le1.txt and directories such as tmp that are not part of the hierarchy starting at directory public_html, it is entirely possible for a PHP script to do so. If the current directory is 'members' we can legitimately refer to fi le "../../etc/fi le1.txt" or directory "../../tmp".
 
Back
Top