PHP 파일 쓰기 편집하기
IT위키
계발자 (토론 | 기여)님의 2023년 2월 18일 (토) 11:43 판 (새 문서: == 파일 열기 == * 쓰기 모드(w)로 파일을 연다. * fopen을 사용한다. <syntaxhighlight lang="php"> <?php $myFile = fopen("testfile.txt", "w") or die("Unable to open file!"); ?> </syntaxhighlight> == 파일 쓰기 == * fwrite를 이용해 파일을 쓴다. <syntaxhighlight lang="php" line="1"> <?php $myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($...)