답변 1개 / 댓글 1개
채택된 답변
+20 포인트
아래와 같이 is_file 함수를 이용해보세요.
if(is_file('./data/test1/1.png')==true){
echo "<script>window.open('./data/test1/1.png')</script>";
}else{
echo "<script>window.open('./data/test2/2.png')</script>";
}
답변을 작성하려면 로그인이 필요합니다.