본문 바로가기

php

PHP ERROR(에러) 확인 error_reporting(E_ALL);ini_set("display_errors", 1); 상단에 넣어주세요. 상세정보 확인 : http://korearank1.tistory.com/10 더보기
[PHP] SOAP is_soap_fault is_soap_fault - Checks if a SOAP call has failed 설명bool is_soap_fault (mixed $object) $client = new SoapClient("some.wsdl", array('exceptions' => 0)); $result = $client->SomeFunction(); if (is_soap_fault($result)) { trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR); try { $client = new SoapClient("some.wsdl"); $result = $client->Som.. 더보기
[PHP] bin2hex bin2hex (PHP 4, php 5) bin2hex - 바이너리 데이터를 16진 표현으로 변환 string bin2hex ( string $str ) str의 16진 표현을 갖는 아스키 문자열을 반환합니다. 높은 니블을 우선하여 바이트 단위로 변환합니다. 출처 : http://php.net/manual/kr/function.bin2hex.php 더보기
[PHP] ord ord(PHP 4, PHP 5) ord — 문자의 아스키 값을 반환설명 int ord (string $string) string에서 첫번째 문자의 아스키 값을 반환합니다. 이 함수는 chr()의 역입니다. 인수 string문자. 반환값 아스키 값을 정수로 반환합니다. 예제Example #1 ord() 예제 $str = "\n"; if (ord($str) == 10) { echo "\$str의 첫번째 문자는 줄바꿈입니다.\n"; } 출처 : http://php.net/manual/kr/function.ord.php 더보기
달력 날짜 배열 생성 function makeDay($yyyymm) $searchDate = ereg_replace("-","",$yyyymm); $first_datetime = mktime(0,0,0,substr($searchDate,-2),1,substr($searchDate,0,4)); $start_day = date('w', $first_datetime); //해당월의 첫날 요일 $end_day = date('t', $first_datetime); //해당월의 마지막날 $weekDayArr = array(); $day_count = 1; for($i=1;$i 더보기
날짜리스트 추출 //php 5.3 이상 필요없음function date_diff($date1, $date2) { $count = 0; //Ex 2014-11-01 ir 2014-11-03if(strtotime($date1) 더보기
error_reporting error_reporting (PHP 4, PHP 5) error_reporting — Sets which PHP errors are reported error_reporting은 - PHP 오류보고 설정 Description ¶ int error_reporting ([ int $level ] ) The error_reporting() function sets the error_reporting directive at runtime. PHP has many levels of errors, using this function sets that level for the duration (runtime) of your script. If the optional level is not set, error_rep.. 더보기
큰 숫자 plus 계산하기 (PHP 계산 오버 했을 시) $cutStringLenLimit = 4; if(strlen($value2['total']) > 4){ $tmp_v = (strlen($value2['total']) - (strlen($value2['total'])%4))/4; for($i=0;$i 4 ){ for($a=0;$a 더보기