<?php
$root_dir = dirname(__FILE__);
/**
* 文件操作类
* Class FileOperation
*/
class FileOperation{
/**
* 实例
*/
static $handle = null;
/**
* 初始化
*/
function __construct($fileName = 'reptile_quanguo_1_error') {
chmod(dirname(__FILE__), 0777);
$errorFile = $fileName.date("Y-m-d").'.txt';
self::$handle = fopen($errorFile, 'a');
}
/**
* 写入文件
**/
function writeToTxt($data) {
// 写入的内容
fwrite(self::$handle, $data);
}//function end
/**
* 写入文件
**/
function closeTxt() {
// 关闭b.php文件
fclose(self::$handle);
// 销毁文件资源句柄变量
//unset($handle);
}
}//class end
$root_dir = dirname(__FILE__);
/**
* 文件操作类
* Class FileOperation
*/
class FileOperation{
/**
* 实例
*/
static $handle = null;
/**
* 初始化
*/
function __construct($fileName = 'reptile_quanguo_1_error') {
chmod(dirname(__FILE__), 0777);
$errorFile = $fileName.date("Y-m-d").'.txt';
self::$handle = fopen($errorFile, 'a');
}
/**
* 写入文件
**/
function writeToTxt($data) {
// 写入的内容
fwrite(self::$handle, $data);
}//function end
/**
* 写入文件
**/
function closeTxt() {
// 关闭b.php文件
fclose(self::$handle);
// 销毁文件资源句柄变量
//unset($handle);
}
}//class end