[PHP] include_once, include 파일 불러오기
여러파일에서 공통적으로 사용하는 코드는 따로 분류후 해당 함수를 사용해서 불러오는 것이 관리하기 편리하다. include는 중복으로 같은 파일을 불러올 경우 모두 실행 되고 include_once는 중복으로 불러와도 한번만 실행되기 때문에 include_once가 많이 사용 된다. 예) 페이지의 공통적으로 사용되는 head와 tail에 사용 include_once(/head.php) ... 페이지 내용 ... include_once(/tail.php)