Zubrag.com :: Forum

Programmers Lounge => Tips and Tricks => Topic started by: zubrag on November 08, 2006, 01:37:59 PM



Title: how to set mime type in php
Post by: zubrag on November 08, 2006, 01:37:59 PM
Code:
<?php

// set mime type example for .mp4
$mtype "video/mp4";

// set header
header("Content-Type: $mtype");
?>


Note: no output is allowed before the header statement (you will receive "headers already sent" or "output started in ..." error).