Revision 20119,
860 bytes
checked in by nanasess, 13 years ago
(diff) |
module 以下は svn:keywords を除外
|
-
Property svn:eol-style set to
LF
|
Line | |
---|
1 | --TEST-- |
---|
2 | Function -- image_type_to_mime_type |
---|
3 | --SKIPIF-- |
---|
4 | <?php if (function_exists('image_type_to_mime_type')) { echo 'skip'; } ?> |
---|
5 | --FILE-- |
---|
6 | <?php |
---|
7 | require_once 'PHP/Compat.php'; |
---|
8 | PHP_Compat::loadFunction('image_type_to_mime_type'); |
---|
9 | |
---|
10 | $types = array ( |
---|
11 | IMAGETYPE_GIF, |
---|
12 | IMAGETYPE_JPEG, |
---|
13 | IMAGETYPE_PNG, |
---|
14 | IMAGETYPE_SWF, |
---|
15 | IMAGETYPE_PSD, |
---|
16 | IMAGETYPE_BMP, |
---|
17 | IMAGETYPE_TIFF_II, |
---|
18 | IMAGETYPE_TIFF_MM, |
---|
19 | IMAGETYPE_JPC, |
---|
20 | IMAGETYPE_JP2, |
---|
21 | IMAGETYPE_JPX, |
---|
22 | IMAGETYPE_JB2, |
---|
23 | IMAGETYPE_SWC, |
---|
24 | IMAGETYPE_IFF, |
---|
25 | IMAGETYPE_WBMP, |
---|
26 | IMAGETYPE_XBM |
---|
27 | ); |
---|
28 | |
---|
29 | foreach ($types as $type) { |
---|
30 | echo image_type_to_mime_type($type), "\n"; |
---|
31 | } |
---|
32 | ?> |
---|
33 | --EXPECT-- |
---|
34 | image/gif |
---|
35 | image/jpeg |
---|
36 | image/png |
---|
37 | application/x-shockwave-flash |
---|
38 | image/psd |
---|
39 | image/bmp |
---|
40 | image/tiff |
---|
41 | image/tiff |
---|
42 | application/octet-stream |
---|
43 | image/jp2 |
---|
44 | application/octet-stream |
---|
45 | application/octet-stream |
---|
46 | application/x-shockwave-flash |
---|
47 | image/iff |
---|
48 | image/vnd.wap.wbmp |
---|
49 | image/xbm |
---|
Note: See
TracBrowser
for help on using the repository browser.