i 想执行守则,以便在用户下载该档案时,应更改档案名称。
实例
$uploaddir="files/userid/";
$filename=rand(1000,9999).time().rand(1000,9999);
move_uploaded_file($_FILES[ userfile ][ tmp_name ], $uploadfile);
使用该代码文档的投射器将储存在服务器上,其名称类似。
23451232325654.pdf
但是,对于用户来说,他/她将具有与学习者(php)一样的逻辑名称。
当用户想要下载这一档案时,他/她就会有这种链接下载。
www.example.com/files/userid/23451232325654.pdf
but this file not stored on user s pc when downloaded as 23451232325654.pdf but i want to store it as their logical name as shown above learn.php