1

我试图在我的本地计算机上制作一个视频库,显示子文件夹列表,然后显示视频链接

我找到了几个代码,但现在似乎没有一个工作我在 js php jquery 中相当新,任何帮助都会很棒

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Show Local Folder File List</title>
</head>
<body>
<div>
<script type="text/JScript">
//note this is JScript, not javascript. Thus the 'type="text/JScript"' in the script tags
function ShowFolderFileList(folderspec){
var fso, f, fc, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(folderspec);
fc = new Enumerator(f.files);
s = "";
for (; !fc.atEnd(); fc.moveNext()) {
s += fc.item();
s += "<br>";
}
return s;
}
//note folder/file paths should use the local windows style backslash and be escaped '\\' :
var fileList = ShowFolderFileList('C:\\vids');
document.write(fileList);
</script>
</div>
</body>
</html>
4

0 回答 0