is_writeable() 함수는 파일이 쓰기 가능한지 확인합니다. 파일이 존재하고 쓰기 가능한 경우 TRUE를 반환합니다.
is_writeablle() 함수는 is_writable()의 별칭입니다. is_writable() 대신 is_writeable()을 사용하는 이점은 "table"이라는 단어가 포함된 파일의 소스 코드를 검색할 때 is_writable() 함수가 검색 결과를 오염시킨다는 것입니다.
구문
is_writeable(file_path)
매개변수
-
file_path - 확인할 파일의 경로입니다.
반환
is_writeable() 함수는 파일이 존재하고 쓰기 가능한 경우 TRUE를 반환합니다.
예시
<?php
$file = "demo.txt";
if(is_writeable($file)) {
echo ("File is writeable!");
} else {
echo ("File is not writeable!");
}
?> 출력
File is not writeable!