Development

json decode 안될 때 확인해야할 것 1. json 양식이 맞는지 확인 텍스트 내용 및 앞 뒤로 {} 괄호가 잘 있는지 확인한다. ""(쌍따옴표)로 감싸져있는게 올바른 양식이며, '(홑따옴표)는 지원하지않는다. 홑따옴표가 있다면 쌍따옴표로 변경해준다. $strHtmlList = str_replace("'",'"',$strHtmlList); json 양식에 맞는 데이터인지 꼭 확인한다. 2. 공백이 있는 경우 올바른 json 양식은 불필요한 공백이 없다. 해당 부분을 체크하자 json decode 안될 때 사용할 함수 공백, " \ 포함되어있으면 json 변환이 안됨 null, 스페이스 포함 preg_replace 써서 정리하기 - UTF-8용 정리 $text = preg_replace('/[\x0..
해당 태그 및 태그의 내용을 모두 제거한다. #style 태그 제거 $strContents = preg_replace('@
preg_match_all('@(.*?)[[:space:]](.*?)@i',$strBody,$arrBody, PREG_PATTERN_ORDER); 정규표현식에 맞는 것들을 찾아 배열로 출력해준다. 위 코드는 태그를 찾아 해당 태그 및 태그의 내용을 불러온다.
특정쿼리 실행 시 발생 데이터 수는 10000건 쿼리문은 select * from 테이블명 where a=value and b in ()인데 in 에서 값을 많이줘서 그런가?
Fatal error: Out of memory (allocated 4194304) (tried to allocate 232471 bytes) in 파일명.php on line 697 PHP 소스코드에 아래 코드 추가 메모리 무제한 설정 ini_set('memory_limit','-1');
# unicode decode function utf8_urldecode($str) { $str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str)); return html_entity_decode($str,null,'UTF-8');; } # use $str = utf8_urldecode($str); 참고 : https://www.php.net/manual/en/function.urldecode.php
· Development
# `(') $strContents = str_replace("'", "`", $strContents); # $strContents = str_replace(" ", " ", $strContents);
· Development
An apllication on remote computer 185.142.236.35 has requested access to the X server. Do you want to allow it? In order to disable this warning, set "X11 remote access" to "full" in mobaXterm global settings --> "X11"tab. 64.227.188.207 원격 컴퓨터 185.142.236.35에서 X 서버에 대한 액세스를 요청했습니다. 허용하시겠습니까? 이 경고를 비활성화하려면 mobaXterm 전역 설정 --> "X11"탭에서 "X11 원격 액세스"를 "full"로 설정하십시오. 일단 설정에서 access를 full로 설정해주었다. 계..
곽진돔
'Development' 카테고리의 글 목록 (18 Page)