PHP22 PHP 두 명이 노는 주사위 놀이 만들기 '; $dice2 = rand(1,6); echo '2 주사위: '.$dice2.''; $player1 = $dice + $dice2; echo 'player1: '.$player1.''; $dice = rand(1,6); echo '1 주사위: '.$dice.''; $dice2 = rand(1,6); echo '2 주사위: '.$dice2.''; $player2 = $dice + $dice2; echo 'player2: '.$player2.''; if ($player1 2019. 12. 31. PHP script 태그를 막기 위한 htmlspecialchars 사용 $title\n"; } } $i = $i + 1; } }?> 2019. 12. 31. PHP require을 이용하여 코드를 줄이기 index.php 2019. 12. 31. PHP 글 삭제 (DB 없이) 글 삭제를 하는 것은 의외로 써야할 코드가 별로 없다. 전 글과 비교했을 때 새로 만들면 되는 파일은 delete_process.php 이다. index.php 전 글의 코드에서 51행의 form 부분이 추가되었다. WEB create 2019. 12. 30. 이전 1 2 3 4 5 6 다음