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

(새 문서: 분류: 파일 ==개요== ;함수 copy() * 파일을 복사하는 함수 ==PHP== 분류: PHP <source lang='php'> cop('example.txt', 'example.txt.bak'); </source> <source lan...)
 
 
(사용자 2명의 중간 판 3개는 보이지 않습니다)
4번째 줄: 4번째 줄:
;함수 copy()
;함수 copy()
* 파일을 복사하는 함수
* 파일을 복사하는 함수
==Go==
[[분류: Go]]
{{참고|Go copy()}}


==PHP==
==PHP==
[[분류: PHP]]
[[분류: PHP]]
<source lang='php'>
{{참고|PHP copy()}}
cop('example.txt', 'example.txt.bak');
<syntaxhighlight lang='php'>
</source>
copy('example.txt', 'example.txt.bak');
<source lang='php'>
</syntaxhighlight>
<syntaxhighlight lang='php'>
$file = 'example.txt';
$file = 'example.txt';
$newfile = 'example.txt.bak';
$newfile = 'example.txt.bak';
17번째 줄: 22번째 줄:
     echo "failed to copy $file...\n";
     echo "failed to copy $file...\n";
}
}
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[함수 rename()]]
* [[함수 rename()]]
* [[리눅스 cp]]
* [[윈도우 copy]]

2023년 4월 12일 (수) 17:41 기준 최신판


1 개요[ | ]

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

2 Go[ | ]

3 PHP[ | ]

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

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

4 같이 보기[ | ]

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