日期:2014-05-17 浏览次数:20475 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>测试</title> <style type="text/css"> </style> <script> </script> </head> <body> <form action="2.php" method="post" enctype="multipart/form-data"> <input type="file" name="j" onchange="ye.value=value" style="display:none"> <input type="text" name="ye" onclick=j.click()> <input type="submit" id="text_2" style="width:40px;" value="上传"> </form> </body> </html>
<? $exName=strrchr($_FILES["j"]["name"],"."); echo "数据为:".$exName; ?>