활용팁에 무조건 다운받기 잘 쓰다가 갑자기 안되는 이유가 몰까용 정보
활용팁에 무조건 다운받기 잘 쓰다가 갑자기 안되는 이유가 몰까용본문
파일을 다운받기 하면 오류 메시지가
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);
?>
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 으로 설정해줘야하는데.. 보안상 않좋다고들 하네요.
소켓을 이용해보세요.
그리하여. on 으로 설정해줘야하는데.. 보안상 않좋다고들 하네요.
소켓을 이용해보세요.
답변은 감사한데요 호스팅 받고 있어서 php설정 건들 수는 없는것 같고
어떻게 해야할지...답이 아니면 비슷한 답이라도..ㅠㅠ 소켓은 전구소켓 밖에 몰라서..ㅠㅠ
어떻게 해야할지...답이 아니면 비슷한 답이라도..ㅠㅠ 소켓은 전구소켓 밖에 몰라서..ㅠㅠ
해결했습니다. 감사