返回   华枫论坛 > ◆ 工作学习◆ > IT交流



发表新主题 回复
 
只看楼主 主题工具
旧 Jan 20th, 2005, 20:59     #1
q168
刁游民
级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时
 
q168 的头像
 
注册日期: Jul 2004
帖子: 636
精华:2
q168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond repute
默认 请教Java, JS, HTML 高手

可以在 HTML / Java Script / Java code 里 embed an OS kernel call 吗?例如,settup box 运行 linux, 它有browser, 能否在这 settop box 里的 HTML/JS/Java page里包含 a kernel call function, 或PERL Script, shell script? 谢谢高手!
q168 当前离线  
回复时引用此帖
旧 Jan 20th, 2005, 21:09   只看该作者   #2
q168
刁游民
级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时
 
q168 的头像
 
注册日期: Jul 2004
帖子: 636
精华:2
声望: 3011198
q168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond repute
默认

or maybe embeded in ASP.
q168 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 00:18   只看该作者   #3
zhaonx
Senior Member
级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时
 
注册日期: Jul 2004
帖子: 545
积分:1
精华:1
声望: 225559
zhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond repute
默认

http://www.php.net/manual/en/ref.w32api.php
看看上面的页面中的内容是否对你有用或者是给你一个提示。
zhaonx 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 01:12   只看该作者   #4
liuzhe
Senior Member
级别:5 | 在线时长:48小时 | 升级还需:12小时
 
注册日期: Jul 2004
帖子: 261
声望: 105
liuzhe will become famous soon enoughliuzhe will become famous soon enough
默认

楼主对web编程看来概念不清
liuzhe 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 01:16   只看该作者   #5
kvdvm
Senior Member
级别:5 | 在线时长:53小时 | 升级还需:7小时
 
注册日期: Jul 2004
帖子: 403
声望: 15248
kvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond reputekvdvm has a reputation beyond repute
默认

引用:
作者: zhaonx
http://www.php.net/manual/en/ref.w32api.php
看看上面的页面中的内容是否对你有用或者是给你一个提示。
楼主提到的是客户端脚本,php在服务端运行.
如果你要在JS或VBS中进行本地调用,要通过一个存在于客户端的配置文件改变应用在自己的脚本上的policy,更细节的方法我也不清楚,但原来在网上看到过一篇介绍性的指南,你可以自己找找看,不过写那个指南的人也认为这种方案是非常之不好用.所以更好的办法是自己编写嵌入在客户端网页内的activex组件,然后在脚本中调用,这就是常在上网时跳出来问你要不要安装某某公司的什么什么了,你也知道,通常这类软件只能通过菜鸟点了"yes"才有机会执行.
所以总的说来,你的网页还是最好不要试图访问客户端本地资源,起码我会对这类网页产生强列的抵触情绪.
kvdvm 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 01:35   只看该作者   #6
BlankBox3065
Senior Member
级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时
 
BlankBox3065 的头像
 
注册日期: Jul 2004
帖子: 1,087
积分:4
精华:2
声望: 65
BlankBox3065 will become famous soon enough
默认

Konel call can be made through JNI. So my understanding is that you can do it in Java and JSP but not html and JS.
BlankBox3065 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 02:05   只看该作者   #7
zhaonx
Senior Member
级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时
 
注册日期: Jul 2004
帖子: 545
积分:1
精华:1
声望: 225559
zhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond repute
默认

看来我还是没搞清楼主的意思。我光顾着看楼主提Perl Script了。Perl Script也是服务器端的吧。楼主好像还要求在liunx下用。我提供的那个连接却是Windows下的。
zhaonx 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 12:49   只看该作者   #8
q168
刁游民
级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时
 
q168 的头像
 
注册日期: Jul 2004
帖子: 636
精华:2
声望: 3011198
q168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond repute
默认 谢谢大家。

我对网叶的概念是不清,因此问题也问得不清。
简单点:
a settop box running Linux, at the start up (开机时), a browser is running and displaying a setup (configuration) page (配置网叶). The configuration page (in HTML/JS format) will ask the user to enter IP,Gateway address etc. How do I design this web page so that when user input the IP address, it will run the "route add -net x.x.x.x netmask 255.255.255.0 gw x.x.x.1" linux kernel command.
多谢指点。
q168 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 21:43   只看该作者   #9
BlankBox3065
Senior Member
级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时
 
BlankBox3065 的头像
 
注册日期: Jul 2004
帖子: 1,087
积分:4
精华:2
声望: 65
BlankBox3065 will become famous soon enough
默认

Did not try it, but you should be able to do this by jsp

user input ip, subnet ...

when submit, run sth like :
Runtime("exe /c route add -net x.x.x.x netmask 255.255.255.0 gw x.x.x.1");
BlankBox3065 当前离线  
回复时引用此帖
旧 Jan 21st, 2005, 21:46   只看该作者   #10
BlankBox3065
Senior Member
级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时
 
BlankBox3065 的头像
 
注册日期: Jul 2004
帖子: 1,087
积分:4
精华:2
声望: 65
BlankBox3065 will become famous soon enough
默认

but remember the above is running on the server, if you wanna run on client, you could do this by Java, applet, or web start ....
BlankBox3065 当前离线  
回复时引用此帖
旧 Jan 22nd, 2005, 00:22   只看该作者   #11
zhaonx
Senior Member
级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时级别:4 | 在线时长:32小时 | 升级还需:13小时
 
注册日期: Jul 2004
帖子: 545
积分:1
精华:1
声望: 225559
zhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond reputezhaonx has a reputation beyond repute
默认

引用:
作者: q168
我对网叶的概念是不清,因此问题也问得不清。
简单点:
a settop box running Linux, at the start up (开机时), a browser is running and displaying a setup (configuration) page (配置网叶). The configuration page (in HTML/JS format) will ask the user to enter IP,Gateway address etc. How do I design this web page so that when user input the IP address, it will run the "route add -net x.x.x.x netmask 255.255.255.0 gw x.x.x.1" linux kernel command.
多谢指点。
我不知道你想让那个"route add ..."的命令在提供配置网页的服务器上运行,还是在访问这个配置网页的客户机上运行?我觉得你的意思是后者。如果是后者,我认为可以实现的可能性极小。我甚至认为是根本不可能的。
首先,这个想法就是极其危险的。如果一个被访问的网页可以调用访问它的客户机的系统命令,这该多可怕啊!我如果设计一个网页可以调用"delete *.*"或者"format c:"命令的话,你敢用windows客户机访问我做的这个网页吗?而且,你还根本不知道我的网页是否调用这样的命令。如果是这样,做黑客就太容易了。

此帖于 Jan 22nd, 2005 20:27 被 zhaonx 编辑。
zhaonx 当前离线  
回复时引用此帖
旧 Jan 22nd, 2005, 12:30   只看该作者   #12
alexcc
Senior Member
级别:0 | 在线时长:0小时 | 升级还需:5小时
 
alexcc 的头像
 
注册日期: Jul 2004
帖子: 1,232
声望: 72
alexcc will become famous soon enough
默认

java得applet也不能使用操作系统核心调用吧.别说核心,好像连客户机得本地硬盘都不能读写的.
不过MS的activex就难说了,想执行本地命令是没问题,不过要用核心调用,还是不行的.微软这点安全意识还是有的,虽然bug多多.

楼主得要求,根本不是web application.
alexcc 当前离线  
回复时引用此帖
旧 Jan 22nd, 2005, 21:50   只看该作者   #13
BlankBox3065
Senior Member
级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时级别:17 | 在线时长:384小时 | 升级还需:12小时
 
BlankBox3065 的头像
 
注册日期: Jul 2004
帖子: 1,087
积分:4
精华:2
声望: 65
BlankBox3065 will become famous soon enough
默认

Take a look at digital jar sign and java security.

引用:
作者: alexcc
java得applet也不能使用操作系统核心调用吧.别说核心,好像连客户机得本地硬盘都不能读写的.
不过MS的activex就难说了,想执行本地命令是没问题,不过要用核心调用,还是不行的.微软这点安全意识还是有的,虽然bug多多.

楼主得要求,根本不是web application.
BlankBox3065 当前离线  
回复时引用此帖
旧 Jan 22nd, 2005, 22:19   只看该作者   #14
bluesands
Junior Member
级别:0 | 在线时长:0小时 | 升级还需:5小时
 
注册日期: Jul 2004
帖子: 8
声望: 28
bluesands is on a distinguished road
默认

If I did not understand wrong, q168 is trying to config other machines using web browser (Html/JS/ASP). This seems a typical multi-tier application. Write a java class or windows component which will sit on the server. Call the method of this class or component to do the config job.
bluesands 当前离线  
回复时引用此帖
旧 Jan 25th, 2005, 17:11   只看该作者   #15
q168
刁游民
级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时
 
q168 的头像
 
注册日期: Jul 2004
帖子: 636
精华:2
声望: 3011198
q168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond repute
默认 好!这里高手真多。继续请教。。

我的意思是:webpage, user, browser, application 全都在同一pc.
user 打开 local webpage,webpage asks user for IP address input, then ask user to click "okay" to execute the application.
这pc 完全没 connect the internet. Webpage is locally located in the PC.

我以为:这webpage 的javascript is:
<a href="/home/bin/an_application.exe -parameters">click here to run application to config ip</a>
但这样行不通。我是javascript 菜鸟,请帮忙。 谢谢啦。
q168 当前离线  
回复时引用此帖
旧 Jan 25th, 2005, 17:35   只看该作者   #16
HK_TNT
Member
级别:0 | 在线时长:1小时 | 升级还需:4小时
 
注册日期: Dec 2004
帖子: 85
声望: 10
HK_TNT is on a distinguished road
默认 应该实现不了。

引用:
作者: q168
我的意思是:webpage, user, browser, application 全都在同一pc.
user 打开 local webpage,webpage asks user for IP address input, then ask user to click "okay" to execute the application.
这pc 完全没 connect the internet. Webpage is locally located in the PC.

我以为:这webpage 的javascript is:
<a href="/home/bin/an_application.exe -parameters">click here to run application to config ip</a>
但这样行不通。我是javascript 菜鸟,请帮忙。 谢谢啦。
其实这和BROWSE的安全机制有关。BROWSE提供你的,也就是在他这个平台里面进行操作。对于跨出它的BROWSE的,不会提供接口。

你那样做的话,也只是在BROWSE里会找这个AN-APPLICATION。EXE来下载。
HK_TNT 当前离线  
回复时引用此帖
旧 Jan 27th, 2005, 16:46   只看该作者   #17
q168
刁游民
级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时
 
q168 的头像
 
注册日期: Jul 2004
帖子: 636
精华:2
声望: 3011198
q168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond repute
默认 急!

<a href="/home/bin/an_application.exe -parameters">click here to run application to config ip</a>

对!这样行不通。只是在BROWSE里会找这个an_application.exe来下载。

但能否把用户填上去的资料(比如:IP address 等) 放在一个file 里面 (注:我说的全都是在同一平台,没有connect to internet).

重复我的问题:
webpage, browser 都在同一部机里(只是一部PC, 没connect to internet),
如何把user 填在 webpage 的资料放在一个文件里。
q168 当前离线  
回复时引用此帖
旧 Jan 27th, 2005, 17:36   只看该作者   #18
alexcc
Senior Member
级别:0 | 在线时长:0小时 | 升级还需:5小时
 
alexcc 的头像
 
注册日期: Jul 2004
帖子: 1,232
声望: 72
alexcc will become famous soon enough
默认

楼主的应用根本就是需要交互的,全在本地也没问题啊,但是必须得有一个web server,否则,就只有写在js里面,没有任何意义.

可以不连 internet,但是得有web server来进行处理.
alexcc 当前离线  
回复时引用此帖
旧 Jan 27th, 2005, 18:21   只看该作者   #19
q168
刁游民
级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时级别:11 | 在线时长:176小时 | 升级还需:16小时
 
q168 的头像
 
注册日期: Jul 2004
帖子: 636
精华:2
声望: 3011198
q168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond reputeq168 has a reputation beyond repute
默认

谢谢Alex,
但这browser (ANT browser, 给手机,settop box 用的),在ucLinux 上行的。 没web server. 它只是support: html4.01, JavaScript 1.3, GIF,JPEG,PNG graphics, Cascading Stule Sheets, Plug-ins, Cookies, SSL, Unicode, multiple windows/talbes/forms.
有何良策?
q168 当前离线  
回复时引用此帖
旧 Jan 27th, 2005, 19:53   只看该作者   #20
HK_TNT
Member
级别:0 | 在线时长:1小时 | 升级还需:4小时
 
注册日期: Dec 2004
帖子: 85
声望: 10
HK_TNT is on a distinguished road
默认 试一下COOKIE

引用:
作者: q168
谢谢Alex,
但这browser (ANT browser, 给手机,settop box 用的),在ucLinux 上行的。 没web server. 它只是support: html4.01, JavaScript 1.3, GIF,JPEG,PNG graphics, Cascading Stule Sheets, Plug-ins, Cookies, SSL, Unicode, multiple windows/talbes/forms.
有何良策?
用户输入的东西放到COOKIE中是没有问题,关键是,你的应用程序是否可以读COOKIE。或者你是否可以用SHELL来读出COOKIE的值,那我就不知道了。(我觉得理论上应该是可以的。)
HK_TNT 当前离线  
回复时引用此帖
发表新主题 回复


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为格林尼治时间 -4。现在的时间是 06:07

请尊重文章原创者,转帖请注明来源及原作者。
凡是本站用户自行发布的任何信息,皆不代表本站的立场,
华枫网站不确保各类信息的正确性和可靠性,也不承担由此而导致的任何直接或间接损失以及任何法律责任。

Copyright © 1999-2024 Chinasmile