"PHP 파일삭제 함수 unlink()"의 두 판 사이의 차이

잔글 (Jmnote님이 PHP unlink() 문서를 PHP 파일삭제 함수 unlink() 문서로 이동했습니다)
4번째 줄: 4번째 줄:
* 성공하면 true, 실패하면 false를 반환함
* 성공하면 true, 실패하면 false를 반환함


<source lang='php'>
unlink('path/file.txt');
</source>
==예제==
<source lang='php'>
<source lang='php'>
$fh = fopen('test.html', 'a');
$fh = fopen('test.html', 'a');

2018년 7월 3일 (화) 11:18 판

1 개요

PHP unlink()
  • 파일을 삭제하는 PHP 함수
  • 성공하면 true, 실패하면 false를 반환함
unlink('path/file.txt');

2 예제

$fh = fopen('test.html', 'a');
fwrite($fh, '<h1>Hello world!</h1>');
fclose($fh);

unlink('test.html');

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}