<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript"> function func(localuser,remotecomputer) { var direfilename = localuser + remotecomputer + ".txt"; var command = "-directory z:\\"+direfilename; myobj.run(command); //myobj.run(arg); //myobj.xxxxx(); } </script></head><body> <div style="display:none;"> <OBJECT id="myobj" classid="CLSID:895B917E-885A-4DA0-BF89-12A03C205AB7"></OBJECT> </div> <a onclick="func('tom','127.0.0.1');">test</a></body></html>
刚搜了下,好像php要按下面这么写,但我试了下还是不行。
<? //include("D:\HPActiveX.ocx"); //$myobj = new COM("{895B917E-885A-4DA0-BF89-12A03C205AB7}") or die("error"); $myobj = new COM("HPActiveX.CHPActiveXCtrl") or die ("error"); $myobj->run("-directory z:\\t0m127.0.0.1");?>
MFC,富文本框吗,要加这个插件好像
MFC,富文本框吗,要加这个插件好像
不是的,环境问题,配下环境就好了,分给你吧。谢谢