<html>
<head>
<title></title>
</head>
<body>
<form action="" method="post">
<input type="file" name="file">
<input type="submit" value="upload">
</form>
</body>
</html>
<?php
if($_POST){
$a=strtoupper($_POST['file']);
echo "文件名称自动转换为大写:".$a."</br>";
$b=strtolower($_POST['file']);
echo "文件名称自动转换为小写:".$b;
}
<head>
<title></title>
</head>
<body>
<form action="" method="post">
<input type="file" name="file">
<input type="submit" value="upload">
</form>
</body>
</html>
<?php
if($_POST){
$a=strtoupper($_POST['file']);
echo "文件名称自动转换为大写:".$a."</br>";
$b=strtolower($_POST['file']);
echo "文件名称自动转换为小写:".$b;
}
?>
本文介绍了一个简单的PHP脚本,用于处理文件上传请求,并实现了将上传的文件名自动转换为大写和小写的功能。通过使用HTML表单和PHP内置函数,可以轻松实现这一功能。
3975

被折叠的 条评论
为什么被折叠?



