"함수 copy()"의 두 판 사이의 차이

7번째 줄: 7번째 줄:
==PHP==
==PHP==
[[분류: PHP]]
[[분류: PHP]]
{{참고|PHP copy()}}
<source lang='php'>
<source lang='php'>
cop('example.txt', 'example.txt.bak');
copy('example.txt', 'example.txt.bak');
</source>
</source>
<source lang='php'>
<source lang='php'>

2017년 6월 3일 (토) 20:51 판


1 개요

함수 copy()
  • 파일을 복사하는 함수

2 PHP

copy('example.txt', 'example.txt.bak');
$file = 'example.txt';
$newfile = 'example.txt.bak';

if (!copy($file, $newfile)) {
    echo "failed to copy $file...\n";
}

3 같이 보기

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