📄 mime-magic.installation.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Installation</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mime-magic.setup.html">Installing/Configuring</a></div> <div class="next" style="text-align: right; float: right;"><a href="mime-magic.configuration.html">Runtime Configuration</a></div> <div class="up"><a href="mime-magic.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="mime-magic.installation" class="section"> <h2 class="title">Installation</h2> <p class="para"> You must compile PHP with the configure switch <span class="option">--with-mime-magic</span> to get support for mime-type functions. The extension needs a copy of the simplified <var class="filename">magic</var> file that is distributed with the Apache httpd. </p> <blockquote><p><b class="note">Note</b>: The configure option has been changed from <span class="option">--enable-mime-magic</span> to <span class="option">--with-mime-magic</span> since PHP 4.3.2 <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: This extension is not capable of handling the fully decorated <var class="filename">magic</var> file that generally comes with standard Linux distro's and is supposed to be used with recent versions of <var class="filename">file</var> command. <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: <b>Note to Win32 Users</b><br /> In order to use this module on a Windows environment, you must set the path to the bundled <var class="filename">magic.mime</var> file in your <var class="filename">php.ini</var>. <br /> <div class="example"> <p><b>Example #1 Setting the path to <var class="filename">magic.mime</var></b></p> <div class="example-contents"><div class="cdata"><pre>mime_magic.magicfile = "$PHP_INSTALL_DIR\magic.mime"</pre></div> </div> </div> <br /> Remember to substitute the <var class="filename">$PHP_INSTALL_DIR</var> for your actual path to PHP in the above example. e.g. <var class="filename">c:\php</var> <br /> </p></blockquote></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mime-magic.setup.html">Installing/Configuring</a></div> <div class="next" style="text-align: right; float: right;"><a href="mime-magic.configuration.html">Runtime Configuration</a></div> <div class="up"><a href="mime-magic.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -