HTML页面检查网络上访问数据库的文件大小 [英] HTML Page to check file sizes of access databases on the network

查看:46
本文介绍了HTML页面检查网络上访问数据库的文件大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用硬件5年后,我设法找到了从事代码领域的工作.我正在设计一个html页面,该页面将向我显示本地网络上数据库的名称,位置和大小.现在,我研究了这个问题,并创建了一个ASP页面,该页面在我的本地计算机上运行良好,但是当我上传到服务器时却无法正常工作.由于我不想更改任何服务器端设置,因此我想出了一个简单的html页面,其中可能包含一个jscript来获取文件大小.我想问的是,有没有人对此任务有任何帮助的信息或方向.还是有更好的方法.

谢谢:)

After working with hardware for 5 years I managed to get a job working in the world of code. I am looking to design a html page that will show me the name, location and size of databases on my local network. Now I have looked into this and created a asp page which works great on my local machine but when I upload to server does not work. As I do not want to change any server side settings yet I figured a simple html page with maybe a jscript to get file size. All I wanted to ask is does anyone have any helpful info or direction on this task. Or is there a better approach.

Thank You :)

推荐答案

在使用core/vanila HTML时,没有任何典型的服务器端执行.您的整个代码将在客户端Web浏览器上执行.但是,请尝试将所有路径(特定于计算机的)详细信息保留在单个文件中,这将使代码管理更加容易,并且避免提供绝对路径,请尝试尽可能使用相对路径.
问候,
Sushant.
As you are using core/vanila HTML, you do not have any typical server side execution. Your entire code is going to be executed on the clients Web Browser. However, try to keep all the paths (machine specific) details in single file, which would make code management easier and avoid giving absolute paths, try using relative paths whereever possible.

Regards,
Sushant.


我想如果我要发布我拥有的代码可能更清楚

我已经在网上获取了这段代码,并在可能的地方进行了调整.拥有
当前,当您单击按钮时,我的代码会发出警报,但是当我尝试将详细信息写入页面时,它将不起作用.
我想拥有的另一个功能是单击即可列出许多位置
(我想监视大约20个文件)
该按钮不是必需的,我唯一的原因是因为没有它我无法使代码正常工作哈哈哈哈,你能告诉我这是我第一次使用Java吗? :)

同时,我也正在疯狂地阅读/学习,因为我试图尽快掌握.

到目前为止我的代码:

< html>
< BODY>
< script language ="JScript">
<!-
函数get1()
{
var myObject,f;
myObject = new ActiveXObject("Scripting.FileSystemObjec…
f = myObject.GetFile("g:\\ Test.txt");
alert(文件大小为:" + f.Size);
}
//->
</script>
< form name ="myFormtest">
< input type ="Button" value ="testfile" onClick =''get1()''>
</form>
</body>
</html>

真的很感谢帮助/指导
i thought It may be more clear if I was to post the code I have

I have grabbed this code online and tweaked where I can so far. Having
Currently my code does an alert when you click the button but when I try to write the details to the page it does not work.
another feature I would like to have is many locations listed with the single click
(i want to monitor around 20 files)
The button is not required, the only reason I have is because I cannot get the code to work without it hahahah can you tell this is my first time with java? :)

Also I am reading / study like crazy as I am trying to get up to speed asap.

my code so far:

<html>
<BODY>
<script language="JScript">
<!--
function get1()
{
var myObject, f;
myObject = new ActiveXObject("Scripting.FileSystemObjec…
f = myObject.GetFile("g:\\Test.txt");
alert("The file size is: " + f.Size);
}
//-->
</script>
<form name="myFormtest">
<input type="Button" value="testfile" onClick=''get1()''>
</form>
</body>
</html>

Really do appreciate the help/ guidance


这篇关于HTML页面检查网络上访问数据库的文件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆