1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
<HTML><HEAD>
<TITLE>Tcl API Reference -- ns_guesstype</TITLE>
<LINK rel=Previous href="tapi-c63.htm">
<LINK rel=ToC href="toc.htm">
<LINK rel=Index href="master.htm">
<LINK rel=Next href="tapi-c65.htm">
</HEAD><BODY BGCOLOR="#ffffff"><A NAME="topofpage"></A>
<TABLE WIDTH=100%>
<TR>
<TD ALIGN=LEFT>
<A NAME="topofpage"></A> <IMG SRC="as-c-sm.gif">
</TD>
<TD ALIGN=RIGHT>
<A href="tapi-c63.htm"><IMG BORDER="0" src=navbprev.gif alt="[ Previous ]"></A>
<A href=toc.htm> <IMG BORDER="0" src=navbhome.gif alt="[ Contents ]"></A>
<A href=master.htm> <IMG BORDER="0" src=navbhelp.gif alt="[ Index ]"></A>
<A href="tapi-c65.htm"> <IMG BORDER="0" src=navbnext.gif alt="[ Next ]"></A>
<A name="7983"> </A>
</TD>
</TR>
</TABLE>
<a name="3596">
</a><h3>ns_guesstype</h3>
<a name="3598">
</a><h4>Overview</h4>
<p><a name="3602">
</a>Lookup MIME Type</p>
<a name="3604">
</a><h4>Syntax</h4>
<p><a name="3608">
</a><b>ns_guesstype</b> <i>filename</i></p>
<a name="3610">
</a><h4>Description</h4>
<p><a name="3612">
</a>This function guesses and returns the MIME type of the file, based on the extension in the file name. It uses a set of default mappings and any mappings that are in the [ns/server/<i>servername</i>/mimetypes] section of the nsd.ini file. The default mappings are:</p>
<pre> <a name="44387"></a>.ai=application/postscript
<a name="44196"></a>.aif=audio/aiff
<a name="44197"></a>.aiff=audio/aiff
<a name="44198"></a>.ani=application/x-navi-animation
<a name="44199"></a>.au=audio/basic
<a name="44200"></a>.avi=video/x-msvideo
<a name="44201"></a>.bin=application/x-macbinary
<a name="44202"></a>.bmp=image/bmp
<a name="44203"></a>.dp=application/commonground
<a name="44204"></a>.exe=application/octet-stream
<a name="44205"></a>.gif=image/gif
<a name="44206"></a>.gz=application/x-compressed
<a name="44207"></a>.hqx=application/mac-binhex40
<a name="44208"></a>.htm=text/html
<a name="44209"></a>.html=text/html
<a name="44210"></a>.jfif=image/jpeg
<a name="44211"></a>.jpe=image/jpeg
<a name="44212"></a>.jpg=image/jpeg
<a name="44213"></a>.jpeg=image/jpeg
<a name="44214"></a>.map=application/x-navimap
<a name="44215"></a>.mov=video/quicktime
<a name="44216"></a>.mpe=video/mpeg
<a name="44217"></a>.mpeg=video/mpeg
<a name="44218"></a>.mpg=video/mpeg
<a name="44219"></a>.nvd=application/x-navidoc
<a name="44220"></a>.nvm=application/x-navimap
<a name="44221"></a>.pbm=image/x-portable-bitmap
<a name="44222"></a>.pdf=application/pdf
<a name="44223"></a>.pgm=image/x-portable-graymap
<a name="44224"></a>.pic=image/pict
<a name="44225"></a>.pict=image/pict
<a name="44226"></a>.pnm=image/x-portable-anymap
<a name="44227"></a>.ps=application/postscript
<a name="44228"></a>.qt=video/quicktime
<a name="44229"></a>.ras=image/x-cmu-raster
<a name="44230"></a>.rgb=image/x-rgb
<a name="44231"></a>.rtf=application/rtf
<a name="44232"></a>.sit=application/x-stuffit
<a name="44233"></a>.snd=audio/basic
<a name="44234"></a>.stl=application/x-navistyle
<a name="44235"></a>.tar=appliation/x-tar
<a name="44236"></a>.text=text/plain
<a name="44237"></a>.tgz=application/x-compressed
<a name="44238"></a>.tif=image/tiff
<a name="44239"></a>.tiff=image/tiff
<a name="44240"></a>.txt=text/plain
<a name="44241"></a>.xbm=image/x-xbitmap
<a name="44242"></a>.xpm=image/x-xpixmap
<a name="44243"></a>.wav=audio/x-wav
<a name="44244"></a>.z=application/x-compressed
<a name="44245"></a>.zip=application/x-compressed
<a name="44246"></a>
</pre><p><a name="49592">
</a><h4>See Also</h4>
<p><a name="49593">
</a>Ns_ServerMimeType(), Ns_MimeIcon() (C API)</p>
<p><a name="49594">
</a>nsd.ini (Configuration file)</p>
<TABLE BORDER="2" CELLPADDING="1" width="100%">
<TR><TD COLSPAN=3><P ALIGN=Center>
<IMG SRC="bluebult.gif">
<A HREF="#topofpage">
<FONT SIZE=-1>Top of Page</FONT></A>
<IMG SRC="bluebult.gif">
</TD></TR>
<TR><TD COLSPAN=3><P ALIGN=Center>
<A href="tapi-c63.htm">
<IMG BORDER="0" src=navbprev.gif alt="[ Previous ]"></A>
<A href=toc.htm>
<IMG BORDER="0" src=navbhome.gif alt="[ Contents ]"></A>
<A href=master.htm>
<IMG BORDER="0" src=navbhelp.gif alt="[ Index ]"></A>
<A href="tapi-c65.htm">
<IMG BORDER="0" src=navbnext.gif alt="[ Next ]"></A>
<BR align=center>
<FONT size=-1>Copyright © 1998-99 America Online,
Inc.</FONT>
</TD></TR></TABLE></BODY></HTML>
|