image_type_to_extension PHP - รับต่อท้ายรูปภาพ
image_type_to_extension PHP - รับต่อท้ายรูปภาพ
image_type_to_extension - ผลตอบแทนส่วนขยายที่เกี่ยวข้องตามประเภทของภาพที่ระบุ
ไวยากรณ์
string image_type_to_extension ( int $imagetype [, bool $include_dot = TRUE ] )
ตามการขยายผลตอบแทน IMAGETYPE_XXX คงได้รับ
ตัวอย่าง
<?php // 创建图像实例 $im = imagecreatetruecolor(100, 100); // 保存图像 png 格式 imagepng($im, './test' . image_type_to_extension(IMAGETYPE_PNG)); imagedestroy($im); ?>
การดำเนินงานของไฟล์ดังกล่าวข้างต้นจะสร้างภาพ test.png ในไดเรกทอรีปัจจุบัน