> For the complete documentation index, see [llms.txt](https://devcenter-help.nhn-commerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devcenter-help.nhn-commerce.com/other-guide/include.md).

# include 사용 가이드

> 파일 경로를 직접 include 하지 않고
>
> 연관된 Controller를 통해 include 대상을 전달하는 방식으로 구현한다.

#### 적용 목적

* 스킨과 비즈니스 로직 분리
* 경로 변경 시, 스킨 수정 최소화
* 보안 및 유지보수성 확보
* 관리자 스킨 구조 일관성 유지

### ⚠️ 잘못된 사용 예시

```
<?php
include "/goods/goods_register.php";
?>

```

### ✅ 권장 사용 방식

* include 대상은 Controller에서 정의
* 스킨에서는 전달받은 변수만 사용

#### 관리자 스킨

```
<?php
...
include($testPage);
?>
```

#### Controller

```
<?php
...
$this->getView()->setDefine('testPage', '{연결하고자 하는 파일 경로}');
?>
```

#### 예시

```
<?php
...
$this->getView()->setDefine(
    'testPage',
    $this->getPath() . '/goods/goods_register.php'
);
?>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devcenter-help.nhn-commerce.com/other-guide/include.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
