프로그래밍/PHP 썸네일형 리스트형 PHP 메모리 부족 php 메모리 부족 오류Fatal error: Allowed memory size of 134217728 bytes exhaustedReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes.오류를 확인해보니 php 메모리 리밋 문제 기본설정 128mb 인데 페이지 메모리가 128mb를 넘어서서 문제 발생.해결방법1 - php 소스 변경ini_set('memory_limit','512M'); // 512메가로 늘리기ini_set('memory_limit','-1'); // 메모리 리밋 무제한으로 설정해결방법2 - php 설정파일 변경 vi /etc/php.ini; M.. 더보기 php query string 확인하기 // 넘겨 받은 페이지가 get 방식으로 쿼리 스트링이 있는지 확인 if($_SERVER['QUERY_STRING'] != "") { $type = $_GET['select_type']; // 받아오는게 있을경우 } 더보기 날짜를 타임스탬프 형식으로 변환해서 날짜 계산하기. 날짜를 기본 2018-10-22 형식으로 불러오고그 형식에 맞춰서 날짜를 timestamp 형식으로 변환후 1달전 날짜 구하기 $search_start_choice_date = date('2018-10-22'); // $search_start_choice_timestamp = strtotime($search_start_choice_date); // first date's timestamp $prev_month = strtotime('-1 month', $search_start_choice_timestamp); $prev_month_start = date('Y-m-d', $prev_month); $prev_month_start의 값은 2018-09-22 가 출력됩니다. 더보기 이전 1 2 3 4 5 ··· 12 다음