> For the complete documentation index, see [llms.txt](https://joungkyun.gitbook.io/php-mod_korean-extension-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://joungkyun.gitbook.io/php-mod_korean-extension-reference/apis/filesystem/getfile_lib.md).

# getfile\_lib

## Proto type

```c
(string) getfile_lib (string path [, int size])
```

## Description

특정 파일의 내용을 반환 한다.

## Arguments

```
(string) path - file name or path
(int) size (optional)
   지정한 값 만큼만 반환 한다. 지정하지 않았을 경우, 전체 파일 내용을 반환한다.
```

## Example

```php
<?php
$path = "./doc/example.txt";
$text = getfile_lib ($path,250);
?>
```

## See also

* [putflie\_lib ()](https://github.com/joungkyun/php-mod_korean-extension-reference/tree/b5398f11118bd0b91db16b0f7beb7a37178353fd/Filesystem/Filesystem/putflie_lib.md)
* [readfile\_lib ()](https://github.com/joungkyun/php-mod_korean-extension-reference/tree/b5398f11118bd0b91db16b0f7beb7a37178353fd/Filesystem/Filesystem/readfile_lib.md)


---

# 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://joungkyun.gitbook.io/php-mod_korean-extension-reference/apis/filesystem/getfile_lib.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.
