<?php
function reqLog(){
	$strLog = '';
	$strLog .= date('Y/m/d H:i:s') . "\t" . basename($_SERVER['PHP_SELF']);

	$strPost ='';
	$hasPost = false;
	foreach( $_POST as $key => $value){
		if( $key == 'now' )continue;
		$hasPost = true;
		break;
	};
	if( $hasPost ){
		$strPost =json_encode($_POST);
	};
	$strFile = '';
	foreach( $_FILES as $keyFiles => $file){
		foreach( $file as $key => $value){
			$strFile .= "\t" . $keyFiles . '.' . $key . "\t:\t" . $value . "\r\n";
		};
	};
	$strLog .= "\r\n";
	if( $strPost != '' ){
		$strLog .= 'POST:'.$strPost. "\r\n";
	};
	if( $strFile != '' ){
		$strLog .= "FILES:[\r\n" . $strFile. "]\r\n";
	};

	if( $strPost != '' || $strFile != '' ){
		file_put_contents( CC\FILE::REQ_LOG , $strLog , FILE_APPEND );
	};
};
