활용팁에 무조건 다운받기 잘 쓰다가 갑자기 안되는 이유가 몰까용 > 그누4 질문답변

그누4 질문답변

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

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

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

본문

파일을 다운받기 하면 오류 메시지가
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);


?>

댓글 전체

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

소켓을 이용해보세요.
답변은 감사한데요 호스팅 받고 있어서 php설정 건들 수는 없는것 같고
어떻게 해야할지...답이 아니면 비슷한 답이라도..ㅠㅠ 소켓은 전구소켓 밖에 몰라서..ㅠㅠ
전체 25 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT