小白教程
所有教程
关于
Search
172.69.59.134
172.69.59.134
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Php image type to extension”的源代码
本页内容
上一节:
Php_getimagesizefromstring
下一节:
Php_image2wbmp
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:image_type_to_extension()}}[[Category:PHP GD 图形处理函数参考手册|4]] = PHP image_type_to_extension - 获取图片后缀 = [[:Category:PHP GD 图形处理函数参考手册]] image_type_to_extension — 根据指定的图像类型返回对应的后缀名。 === 语法 === <sample title="" desc="" lang="php" hererun="1"> string image_type_to_extension ( int $imagetype [, bool $include_dot = TRUE ] ) </sample> 根据给定的常量 IMAGETYPE_XXX 返回后缀名。 == <sample title="" desc="" lang="php" hererun="1"> <?php // 创建图像实例 $im = imagecreatetruecolor(100, 100); // 保存图像 png 格式 imagepng($im, './test' . image_type_to_extension(IMAGETYPE_PNG)); imagedestroy($im); ?> </sample> 执行以上文件会在当期目录下生成一个 test.png 的图片。 [[:Category:PHP GD 图形处理函数参考手册]]
返回至“
Php image type to extension
”。
上一节:
Php_getimagesizefromstring
下一节:
Php_image2wbmp