Copier après la connexion
php
header("Content-type:text/html;charse=utf8"
);
if(
isset(
$_POST['file'
])){
$pic =
$_POST['file'
];
$pics =
explode(".",
$pic);
echo "上传文件的扩展名为:".
$pics[
count(
$pics)-1
];
}
?>

以上就介绍了php使用post方式获得文件扩展名,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。