> For the complete documentation index, see [llms.txt](https://kants.gitbook.io/xeant/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kants.gitbook.io/xeant/xe/file.md).

# File

확장 변수에서 SIGN값을 이미지 파일로 저

```php
if (!is_dir('files/cache/ezamanager/excel/')) {
    mkdir('files/cache/ezamanager/excel/');
}

$data_uri = $value;
$encoded_image = explode(",", $data_uri)[1];
$decoded_image = base64_decode($encoded_image);

$path = "files/cache/ezamanager/excel/"; 
$file_name = md5(uniqid(mt_rand(), true)) .'.png';
file_put_contents($path.$file_name, $decoded_image);
$oMail->addCidAttachment($path . $file_name, 'png'); 

$mail_content[$extra_item->eid] = $path . $file_name;
$content .= $extra_item->name. '파일 경로:  ' . $path . $file_name . "\r\n";
```
