Read and write text files using Sitemagic CMS
It can be useful to read and write data to and from text files. This is possible using the SMTextFileWriter
classes. The following examples demonstrate how easy this is.
Write to text file
$writer = new SMTextFileWriter("messages.txt");
Read from text file
$reader = new SMTextFileReader("messages.txt");
$content = $reader->ReadAll();