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

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

팁앤테크

로그파일 남기기

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 30,139회 작성일 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 779건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
779 제로 263 06-18
778 제로 2991 03-21
777 제로 3404 02-23
776 제로 29980 11-02
775 제로 33241 07-10
774 제로 42499 04-06
773 제로 30968 02-21
772 제로 35823 12-31
771 제로 30080 12-24
770 제로 29926 12-04
769 제로 32524 10-17
768 제로 31395 10-02
767 제로 54827 08-04
766 제로 29841 08-04
765 제로 40187 08-03
764 제로 40510 07-08
763 제로 68950 07-08
762 제로 83030 07-06
761 제로 31207 06-09
760 제로 36674 06-03
759 제로 35049 04-16
758 제로 35623 03-29
열람중 제로 30140 03-26
756 제로 37254 03-12
755 제로 32212 03-10

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
1,086
어제
25,212
최대
431,155
전체
6,726,338
Copyright (c) 株式会社YHPLUS. All rights reserved.