
CURLFile::setPostFilename 메소드는 CURLFile 객체가 업로드할 파일의 이름을 지정하는 데 사용됩니다.
예시:
#hostingforum.kr
php
$file = new CURLFile('example.txt', 'text/plain', 'example.txt');
$file->setPostFilename('custom_name.txt');
이 메소드는 실제 업로드할 파일 이름을 변경하는 데 사용됩니다. 예를 들어, `example.txt` 파일을 업로드할 때, `custom_name.txt`라는 이름으로 업로드할 수 있습니다.
이 메소드는 CURLFile 객체의 파일 이름을 변경할 때 사용됩니다. 업로드할 파일의 이름을 변경하는 데 유용합니다.
2025-04-25 21:11