랜덤 이밎(IMG) URL 출력 질문 채택완료
<?php </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);">$num = mt_rand(1,1601); </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"> </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);">if($num <= 1000) </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"> $img = $num . "gif"; </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);">else if($num <=1500) </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"> $img = $num . "jpg"; </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);">else if($num <=1600) </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"> $img = $num . "png"; </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);">else if($num <=1601) </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"> $img = $num . "png"; </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);">?> </span><br style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px;"><span style="color: rgb(51, 51, 51); font-family: 돋움, Dotum, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"><img src="img/<?=$img?>"/>
1601번 이미지는 클릭시 http://naver.com%22/" target="_blank" style="color: rgb(0, 0, 0); text-decoration: none; font-family: 돋움, Dotum, sans-serif; font-size: 12px;">http://naver.com"> 넣고싶은데 어떻게 해야될까요?
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인