-
{"data":{"0":false,"a":"false","c":"","b":10,"1":{"0":[20,340,40],"k":[20,340,40],"1":[20,340,40]}}} array 키값이 있는경우 {} 로 처리가 되며 value값들은 []로 되어 출력된다 json경우 문자인지 숫자인지 구분이 된다 ""을 쓴경우 문자열로 인식을 한다
echo(preg_replace('/{@([\S]+)}/', "", $tempCont)); 정규표현식 사이트 http://www.tutorialspoint.com/php/php_regular_expression.htm
echo(get_defined_vars); 반환하는 결과 배열에 $GLOBALS 변수가 포함됩니다.
Thu May 19 14:34:24 +0800 2016 유닉스타임으로 변경후 date타입으로 변경 $time = strtotime($feed["created_at"]) //출력예시 144415140 date( "Y-m-d H:i:s", $time ); //출력예시 2016-05-19 06:33:17
public > protected > private 변수의 접근 제한자를 생략하면 public으로 자동인식. proctected는 클래스 내부에서만 접근가능, 상속가능. private는 클래스 내부에서만 접근가능, 상속불가.
ini_set('gd.jpeg_ignore_warning' , 1); ini_set('display_startup_errors' , 1); ini_set('display_errors' , 1); error_reporting(E_ALL);
header( "Content-type: application/vnd.ms-excel; charset=utf-8" ); header( "Content-Disposition: attachment; filename = payment.xls" ); header( "Content-Description: PHP4 Generated Data" ); 이름 값 //php 헤더 추가하면 엑셀파일로 다운로드 된다
$log_txt = print_r($sql, true); $log_file = fopen( "./pglog.txt", "a+"); fwrite($log_file, $log_txt."\r\n"); fclose($log_file); 새로쓰기 'w', 덧쓰기'a+' //커서위치를 말하는것이다