时间:2021-07-01 10:21:17 帮助过:3人阅读
php header("Content-type:text/html;charse=utf8"); if(isset($_POST['file'])){ $pic = $_POST['file']; $pics = explode(".", $pic); echo "上传文件的扩展名为:".$pics[count($pics)-1]; } ?>
http://www.bkjia.com/PHPjc/1052440.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1052440.htmlTechArticlephp使用post方式获得文件扩展名, form action="" method="post" input type="file" value="" name="file" size="20" input type="submit" value="check"/form? php header ("Conte...