public function tuan_log($data)
{
$file = BASE_DATA_PATH . DS . ‘log‘ . DS . ‘/tuan_1212.log‘;
file_put_contents($file, date(‘Y-m-d H:i:s‘) . "\t" . print_r($data, true) . PHP_EOL, FILE_APPEND);
}
原文:http://www.cnblogs.com/php-rearch/p/5079501.html