mime_content_type - 파일의 MIME 내용 유형 감지 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

mime_content_type - 파일의 MIME 내용 유형 감지 정보

PHP mime_content_type - 파일의 MIME 내용 유형 감지

본문

mime_content_type - 파일의 MIME 내용 유형 감지


설명 ¶


string mime_content_type ( string $filename )

magic.mime 파일의 정보를 사용하여 결정된 파일의 MIME 내용 유형을 반환 합니다.


매개 변수 ¶


filename

테스트 된 파일의 경로.


반환 값 ¶


text / plain 또는 application / octet-stream 과 같은 MIME 형식의 내용 유형을 반환합니다 .


예 ¶


Example # 1 mime_content_type () 예제


<?php

echo mime_content_type('php.gif') . "\n";

echo mime_content_type('test.php');

?>


위의 예는 다음과 같이 출력됩니다.


image/gif

text/plain

추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로