로그파일 남기기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

로그파일 남기기

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 35,815회 작성일 22-03-26 19:24

본문

$requestData = file_get_contents('php://input');

function writelog($file, $log, $ln="")
{
   global $requestData;
   $fp = @fopen($file, "a+");
   ob_start();
   print_r($log);
   $msg = ob_get_contents();
   ob_end_clean();

   $date = date("Y-m-d H:i:s");

   $logMsg = "\n\n==============================\n";
   $logMsg .= ($ln == "") ? ("[".$date."] ") : ("[".$date."] Ln".$ln.": ");

   $msg = $logMsg . $msg;
   $msg .= "\n";
   $msg .= $requestData;

   @fwrite($fp, $msg);
   @fclose($fp);
}
$logFile = G5_PATH."/log/api_".G5_TIME_YMD.".log";

 

echo json_encode($data);
writeLog($logFile, $mb_id.' - '.json_encode($data));

댓글목록

등록된 댓글이 없습니다.

Total 829건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
829 제로 10111 06-18
828 제로 13159 03-21
827 제로 11320 02-23
826 제로 35838 11-02
825 제로 38527 07-10
824 제로 61548 04-06
823 제로 36645 02-21
822 제로 46559 12-31
821 제로 36005 12-24
820 제로 35771 12-04
819 제로 39430 10-17
818 제로 37755 10-02
817 제로 75927 08-04
816 제로 35680 08-04
815 제로 57169 08-03
814 제로 55664 07-08
813 제로 91740 07-08
812 제로 111898 07-06
811 제로 36937 06-09
810 제로 44099 06-03
809 제로 42270 04-16
808 제로 43173 03-29
열람중 제로 35816 03-26
806 제로 46845 03-12
805 제로 38535 03-10

검색


사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5470-4714
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
8,692
어제
65,126
최대
552,140
전체
16,829,846
Copyright (c) 株式会社YHPLUS. All rights reserved.