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로 설정해주었다. 계..
Warning: reset(): Passed variable is not an array or object in 경로/파일명.php on line 1027 전달된 변수가 배열 또는 개체가 아닙니다.
php 출력에서 한글이 깨질 경우 아래 set 넣어주기 mysql_query ( 'set names utf8' );
날짜를 변환하고 싶을 때 아래 처럼 해주면 된다. 기본 try { $strDate = new DateTime($strDate); } catch(Exception $e) { echo" \n 날짜변환 오류"; } $strDate = @date_format($strDate, 'Y-m-d'); @date_format 에서 원하는 양식으로 날짜를 변환할 수 있다. Y-m-d로 변환하면 2022-06-30이 나오게 된다. ex. Y.m.d => 2022.06.30 / Ymd => 20220630 / ymd => 220630 ... # 2021-12-22T11:00:44+00:00 # 2021-12-22T11:00:44+00:00 // 1 $strDate = explode('+', $strDate[1]); $strD..
숫자만 남기기 : 숫자를 제외한 모든 문자 제거 $text = preg_replace("/[^0-9]*/s", "", $text); 영어만 제거 $strDate = preg_replace("/[a-z]/i", "", $strDate);
preg_replace() 함수를 이용해서 정규식 치환하기 $strContent = preg_replace("(\]+)\>)", "", $strContent); # 모든 태그 제거 ( 공백으로 치환) $strContents_cp = preg_replace("(\]+)\>)", " ", $strContents_cp); # 치환 후 공백제거(2칸 이상인 공백 한칸으로 변경) $strContents_cp = preg_replace("/\s{2,}/"," ",$strContents_cp);
# 모든 태그 제거 $strContents = preg_replace("(\]+)\>)", "", $strContents); # 한칸 이상 공백 제거 $strContents = preg_replace("/\s{2,}/"," ",$strContents); # 탭키 제거 $strContents = str_replace("\t", "", $strContents); # ` $strContents = str_replace("'", "`", $strContents); #   $strContents = str_replace(" ", " ", $strContents); 1번째 코드 주로 사용하나, 가끔 공백(탭)이 제거가 안된다. $strBody = str_replace("\r", "", str_rep..