PHPã§$_FILES['userfile']['type']ãä¿¡ç¨ã§ããªãåé¡ã«ã¤ã㦠$_FILES['userfile']['type']ã¯ä¿¡ç¨ã§ãã¾ããã¨ããè¨è¿°ãPHPã®ããã¥ã¢ã«ã«ã¯ããã¾ãã URLï¼http://www.php.net/manual/ja/features.file-upload.php ããã§ä½ã対çã¯ãªããã¨æã調ã¹ã¦ã¿ãã¨ããããç´ æ´ããããã¼ã¸ã«åºä¼ãã¾ããã ã¿ã¤ãã«ï¼ããã¡ã¤ã«ã®å é 8ãã¤ãã ãã§ç»åã®ãã©ã¼ãããã調ã¹ãã URLï¼http://labs.gmo.jp/blog/ku/2007/05/8.html ããã«ã¯ä»¥ä¸ã®æ£è¦è¡¨ç¾ã§åãã©ã¼ãããã®ãããã調ã¹ãã¨è¯ãã¨ããã¾ããã if ( preg_match( '/^\x89PNG\x0d\x0a\x1a\x0a/', $image_stream) ) { $type = "png"
{{#tags}}- {{label}}
{{/tags}}