0
您好我已经做了一个基于PHP的文件上传器,使我的网站更像一个FTP服务器,但人们无法上传文件夹或应用程序等,因为相反,当他们点击打开在左下它只是打开应用程序的文件夹(邻MAC“显示包内容”类似,不允许实际应用的上传。是否有变通方法吗?HTML/PHP允许输入文件允许导航上传
<label for="file">Select a file:</label> <input type="file" name="userfile" id="file" class="button"> <br />
<button class="button">Upload File</button>
<hr />
<?php
$count = 0;
if ($handle = opendir('files')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != ".DS_Store") {
$count++;
print("<a href=\"files/".$file."\">".$file."</a><br />\n");
}
}
closedir($handle);
}
?>
应用* *是文件夹。 –
使用flash,java或silverlight,这是绕过它的唯一方法 – Tschallacka