시

활용팁에 무조건 다운받기 잘 쓰다가 갑자기 안되는 이유가 몰까용

파일을 다운받기 하면 오류 메시지가
Warning: fopen(): URL file-access is disabled in the server configuration in /home/hosting_users/newgmorg/www/bbs/down.php on line 20
Warning: fopen(http://아이피주소:100/mp3/2008/20081225.mp3): failed to open stream: no suitable wrapper could be found in /home/hosting_users/newgmorg/www/bbs/down.php on line 20
Warning: fpassthru(): supplied argument is not a valid stream resource in /home/hosting_users/newgmorg/www/bbs/down.php on line 21

Warning: fclose(): supplied argument is not a valid stream resource in /home/hosting_users/newgmorg/www/bbs/down.php on line 22


down.php 내용
<?
$code = "http://아이피주소:100/mp3";
$file="$code/$filename";

// 브라우저 골라서 헤더를 따로 따로 전송 해 준다.(5.5 일때는 다르게 해줘야 함)
if( strstr($HTTP_USER_AGENT,"MSIE 5.5")){
header("Content-Type: doesn/matter ");
header("Content-Disposition: filename=$filename ");
header("Content-Transfer-Encoding: binary ");
header("Pragma: no-cache");
header("Expires: 0");
}else{

Header("Content-type: file/unknown");
Header("Content-Disposition: attachment; filename=$filename");
Header("Content-Description: PHP3 Generated Data");
header("Pragma: no-cache");
header("Expires: 0");
}
$fp = fopen("$file","r");
if (!fpassthru($fp))
fclose($fp);


?>

댓글 3개

php 설정에서 allow_url_include = off 상태임을 알리는 오류입니다,
그리하여. on 으로 설정해줘야하는데.. 보안상 않좋다고들 하네요.

소켓을 이용해보세요.
답변은 감사한데요 호스팅 받고 있어서 php설정 건들 수는 없는것 같고
어떻게 해야할지...답이 아니면 비슷한 답이라도..ㅠㅠ 소켓은 전구소켓 밖에 몰라서..ㅠㅠ
해결했습니다. 감사
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
08-12-30 조회 3,032
08-12-30 조회 1,926
08-12-30 조회 1,287
08-12-30 조회 1,334
08-12-30 조회 1,607
08-12-30 조회 824
08-12-30 조회 862
08-12-30 조회 1,030
08-12-30 조회 1,078
08-12-30 조회 1,041
08-12-30 조회 844
08-12-30 조회 1,090
08-12-30 조회 969
08-12-29 조회 1,002
08-12-29 조회 905
08-12-29 조회 1,072
08-12-29 조회 1,661
08-12-29 조회 1,005
08-12-29 조회 1,136
08-12-29 조회 1,166