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

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

팁앤테크

로그파일 남기기

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 30,133회 작성일 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 제로 258 06-18
778 제로 2985 03-21
777 제로 3397 02-23
776 제로 29975 11-02
775 제로 33237 07-10
774 제로 42491 04-06
773 제로 30961 02-21
772 제로 35813 12-31
771 제로 30073 12-24
770 제로 29921 12-04
769 제로 32519 10-17
768 제로 31388 10-02
767 제로 54812 08-04
766 제로 29832 08-04
765 제로 40179 08-03
764 제로 40502 07-08
763 제로 68937 07-08
762 제로 83006 07-06
761 제로 31201 06-09
760 제로 36667 06-03
759 제로 35043 04-16
758 제로 35618 03-29
열람중 제로 30134 03-26
756 제로 37249 03-12
755 제로 32203 03-10

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
24,373
어제
11,101
최대
431,155
전체
6,724,413
Copyright (c) 株式会社YHPLUS. All rights reserved.