Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Function Reference

mime ( path )

Description
No description.
 
Parameters
requiredpath
 
Code
366  function mime($path)
367  {
368      switch (strtoupper(ext($path)))
369      {
370          case "HTM" :
371          case "HTML" :
372              return "text/html";
373          case "CSV" :
374          case "TXT" :
375              return "text/plain";
376          case "JPEG" :
377          case "JPG" :
378              return "image/jpeg";
379          case "GIF" :
380              return "image/gif";
381          case "PNG" :
382              return "image/png";
383          case "PDF" :
384              return "application/pdf";
385          case "CSS" :
386              return "text/css";
387          case "JS" :
388              return "application/x-javascript";
389          case "XLS" :
390              return "application/vnd.ms-excel";
391          case "DOC" :
392          case "MHT" :
393              return "application/msword";
394          case "WPS" :
395              return "application/vnd.ms-works";
396          case "RTF" :
397              return "application/rtf";
398          case "SWF" :
399              return "application/x-shockwave-flash";
400          case "FLV" :
401              return "video/x-flv";
402          case "MPG" :
403              return "video/mpeg";
404          case "JAR" :
405              return "application/java-archive";
406          case "XML" :
407              return "application/xml";
408          case "ICO" :
409              return "image/vnd.microsoft.icon";
410          case "ZIP" :
411              return "application/zip";
412          case "GZ" :
413              return "application/x-gzip";
414          default :
415              return "application/octet-stream";
416      }
417  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads