사용자가 로그인 할 때만 액세스 할 수있는 개인 파일의 디렉토리를 만들려고했습니다. 이렇게하려면 웹 디렉토리 외부의 폴더를 사용하고 허용 된 경우 PHP에 액세스했습니다. .일부 파일을 비공개로 유지
다음은 예입니다 :
function display_movie($file){
printf("`<video id='movie' width='960' height='416' controls='controls' onerror='fix()'>`<br/>
`<source src='movie.php?file=%s' type='video/ogg; codecs=\"theora, vorbis\"'>
</video>", rawurlencode($file)`);
}
이 이미지에 잘 작동하지만, 미디어 플레이어를 나누기. 또한, 나는 리눅스 머신에서만 이것을 로컬에서 테스트했다.
아이디어가 있으십니까? 감사. 당신의 <br />
무엇을
이 movie.php에 ...
if(file_exists($fileDir . md5($file) . $ext)) {
$contents = file_get_contents($fileDir . md5($file) . $ext);
}
header('Content-type: video/ogg');
echo $contents;
주세요 movie.php –
th의 내용보기 ose
html 태그는 PHP 코드 – Moak
에 없어야합니다 .... 나는 제대로 게시물을 표시하려고했지만 실패했습니다. 나는 그들을 삭제했지만 – user490895