如何我的上傳界面顯示文件后綴
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Strict//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>文件上傳</title>
</head>
<body>
<form action="doaction.php" method="post" enctype="multipart/form-data">
請選擇您要上傳的文件:
<input type="file" name="myfile"/><br>
<input type="submit" value="上傳文件"/>
</form>
</body>
</html>
2016-08-16
2018-01-31
<?php
$wjm="C:zhuomian/img/a.png";
$string=substr($wjm,strrpos($wjm,"."));
echo $string;
echo '<hr>';
//第二個
function string(){
$a="C:/meitu/img/p.text";
$str=substr($a,strrpos($a,"."));
return $str;
}
echo string();