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

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

팁앤테크

로그파일 남기기

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 30,145회 작성일 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 제로 265 06-18
778 제로 2997 03-21
777 제로 3410 02-23
776 제로 29984 11-02
775 제로 33245 07-10
774 제로 42507 04-06
773 제로 30975 02-21
772 제로 35828 12-31
771 제로 30087 12-24
770 제로 29934 12-04
769 제로 32528 10-17
768 제로 31401 10-02
767 제로 54829 08-04
766 제로 29848 08-04
765 제로 40194 08-03
764 제로 40517 07-08
763 제로 68959 07-08
762 제로 83036 07-06
761 제로 31213 06-09
760 제로 36680 06-03
759 제로 35055 04-16
758 제로 35630 03-29
열람중 제로 30146 03-26
756 제로 37263 03-12
755 제로 32218 03-10

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
5,181
어제
25,212
최대
431,155
전체
6,730,433
Copyright (c) 株式会社YHPLUS. All rights reserved.