image.installation.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 149 行
HTML
149 行
<!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="image.setup.html">Installing/Configuring</a></div> <div class="next" style="text-align: right; float: right;"><a href="image.configuration.html">Runtime Configuration</a></div> <div class="up"><a href="image.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="image.installation" class="section"> <h2 class="title">Installation</h2> <p class="para"> To enable GD-support configure PHP <span class="option">--with-gd[=DIR]</span>, where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), use the configure option <span class="option">--with-gd</span>. GD library requires <span class="productname">libpng</span> and <span class="productname">libjpeg</span> to compile. </p> <p class="para"> In Windows, you'll include the GD2 DLL <var class="filename">php_gd2.dll</var> as an extension in <var class="filename">php.ini</var>. The GD1 DLL <var class="filename">php_gd.dll</var> was removed in PHP 4.3.2. Also note that the preferred truecolor image functions, such as <a href="function.imagecreatetruecolor.html" class="function">imagecreatetruecolor()</a>, require GD2. </p> <p class="para"> Enhance the capabilities of GD to handle more image formats by specifying the <i>--with-XXXX</i> configure switch to your PHP configure line. <table border="5"> <caption><b>Supported image formats</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Image Format</th> <th colspan="1">Configure Switch</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>jpeg-6b</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for jpeg-6b add <span class="option">--with-jpeg-dir=DIR</span>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>png</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for png add <span class="option">--with-png-dir=DIR</span>. Note, libpng requires the <a href="zlib.setup.html#zlib.requirements" class="link">zlib library</a>, therefore add <span class="option">--with-zlib-dir[=DIR]</span> to your configure line. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>xpm</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for xpm add <span class="option">--with-xpm-dir=DIR</span>. If configure is not able to find the required libraries, you may add the path to your X11 libraries. </td> </tr> </tbody> </colgroup> </table> <blockquote><p><b class="note">Note</b>: <span class="simpara"> When compiling PHP with libpng, you must use the same version that was linked with the GD library. </span> </p></blockquote> </p> <p class="para"> Enhance the capabilities of GD to deal with different fonts by specifying the <i>--with-XXXX</i> configure switch to your PHP configure line. <table border="5"> <caption><b>Supported font libraries</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Font library</th> <th colspan="1">Configure Switch</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>FreeType 1.x</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for FreeType 1.x add <span class="option">--with-ttf[=DIR]</span>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>FreeType 2</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for FreeType 2 add <span class="option">--with-freetype-dir=DIR</span>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>T1lib</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for T1lib (Postscript Type 1 fonts) add <span class="option">--with-t1lib[=DIR]</span>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><i>Native TrueType string function</i></td> <td colspan="1" rowspan="1" align="left"> To enable support for native TrueType string function add <span class="option">--enable-gd-native-ttf</span>. </td> </tr> </tbody> </colgroup> </table> </p></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="image.setup.html">Installing/Configuring</a></div> <div class="next" style="text-align: right; float: right;"><a href="image.configuration.html">Runtime Configuration</a></div> <div class="up"><a href="image.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 + =
减小字号Ctrl + -
显示快捷键?