SimpleTest : http://simpletest.org/index.html
文件操作类 file.class.php
class File
{
var $filename;
function File($file)
{
if (emptyempty($file)) {
die('Filename should not be empty');
}
$this->filename = $file;
if (!$this->exists() && !$this->create()) die('Unable to find / create the file');
}
function exists()
{
return file_exists($this->filename);
}
function create()
{
if ($this->exists()) return true;
return $this->putContents(null);
}
function getContents()
{
return @file_get_contents($this->filename);
文章来源于领测软件测试网 https://www.ltesting.net/