PHP 썸네일형 리스트형 PHP DOM XML 파싱 static function getPrintOptionFromPrintNo($print_no){ //$print_no = "124"; $select_print = "select * from dat_print where p_no='$print_no'"; $result_print = mysql_query($select_print); $result_row = mysql_fetch_array($result_print); $print_xml = $result_row['p_print_xml']; $doc = new DOMDocument(); $doc->loadXML($print_xml); $groupXMLList = $doc->getElementsByTagName("group"); $returnSize = arra.. 더보기 php xml 파싱 DOM $xml = "".$row['p_image_xml'].""; //echo ""; $doc = new DomDocument(); $doc->loadXML($xml); $nodeList = $doc->getElementsByTagName("image"); foreach($nodeList as $node){ //echo $node->getAttribute("no")." "; if($node->getAttribute("no") == "0"){ //echo ""; $this->pageCheckResult(false, $i); break; } } $row['p+image_xml'] 은 형태의 xmllist.. 더보기 파일 처리 함수 copy 파일 복사 int copy(string source, string str); basename 파일이 위치한 경로의 디렉토리 반환 string basename(string path); dirname 파일이 위치한 경로의 상위 디렉토리 반환 string dirname(string path); diskfreespace 지정된 디렉토리에 저장 가능한 남은 용량을 반환 float diskfreespace(string directory); fclose 지정된 파일 포인터를 닫는다 fgetc 파일 포인터에서 문자를 읽는다 file 파일전체를 읽어서 배열에 저장 array file(string filename); file_exists 파일이 존재하는지 판단 filegroup 파일의 그룹을 알고자 할 경우 사용.. 더보기 디렉토리 함수 chdir change directoty 의 약자로 현재 디렉토리를 변경할 때 사용하며 도스 명령어중 cd 명령어와 같은 기능 int chdir(string directory); dir 디렉토리에 대한 정보를 앍자 할 경우 사용하며 도스 명령어중에 dir 명령어와 같은 기능 dir(string directory); closedir 현재 열려있는 디렉토리를 닫을 때 사용 void closedir(int dir_handler); mkdir 디렉토리 생성 opendir 디렉토리를 사용하기 위해 디렉토리를 열 때 사용 int opendir(string path); readdir opendir() 함수를 이용해 연 디렉토리를 읽을 때 사용 string readdir(int dir_handler); rewinddi.. 더보기 문자열 처리 함수 AddSlashes 특수문자 ', ", \ 를 출력할때 백슬래시를 이용해 양쪽문자열을 감싼다. addslashes(string str); crop 뒤쪽의 여백삭제 chop(string str); Chr 지정된 문자를 반환 chr(int ascii); chunk_spit 문자열을 비슷한 크기로 나눔 convert_cyr_string 문자열을 특정 문자로 바꿀때 사용 crypt 문자열을 DES encryption 방법으로 변환 ctypt(string str, string[salt]); echo 문자열 출력 explode 지정된 문자열을 문자열 기준으로 나눔 explode(string separator, string str); implode 배열원소를 문자열을 사용해 연결 implode(array pieces.. 더보기 isset() 값이 있는지 체크 isset($변수); 더보기 split 문자를 배열로 split("구분문자", "원본문자열"); $old_pageArr = split(",", $capturelist_arr['cl_album_page']); 더보기 이전 1 다음