function.imagetypes.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 63 行

HTML
63
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Return the image types supported by this PHP build</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="function.imagettftext.html">imagettftext</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagewbmp.html">imagewbmp</a></div> <div class="up"><a href="ref.image.html">GD Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.imagetypes" class="refentry"> <div class="refnamediv">  <h1 class="refname">imagetypes</h1>  <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5)</p><p class="refpurpose"><span class="refname">imagetypes</span> &mdash; <span class="dc-title">Return the image types supported by this PHP build</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">int</span> <span class="methodname"><b><b>imagetypes</b></b></span>    ( <span class="methodparam">void</span>   )</div>  <p class="para rdfs-comment">   Returns the image types supported by the current PHP installation.  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns a bit-field corresponding to the image formats supported by the   version of GD linked into PHP.  The following bits are returned,    <b><tt>IMG_GIF</tt></b> | <b><tt>IMG_JPG</tt></b> |   <b><tt>IMG_PNG</tt></b> | <b><tt>IMG_WBMP</tt></b> |    <b><tt>IMG_XPM</tt></b>.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 Checking for PNG support</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">imagetypes</span><span style="color: #007700">()&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">IMG_PNG</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"PNG&nbsp;Support&nbsp;is&nbsp;enabled"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagettftext.html">imagettftext</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagewbmp.html">imagewbmp</a></div> <div class="up"><a href="ref.image.html">GD Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?