请问在php中如何调用MFC的activeX控件?我在html里可以调用但在.php网页里就不能调用了

WBOY
Release: 2016-06-23 14:11:15
Original
1211 people have browsed it

<!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>
Copy after login


上面这个代码是我做完控件并且注册后写的html例子,保存成XXX.html后测试也是成功的。但是如果把这个文件保存成XXX.php插件就会有问题(均放在apache中测试)。请问怎么才能在.php的文件中像这样调用activeX控件??


回复讨论(解决方案)

刚搜了下,好像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");?>
Copy after login

谁能帮忙解释解释到底应该怎么弄?

MFC,富文本框吗,要加这个插件好像

MFC,富文本框吗,要加这个插件好像
不是的,环境问题,配下环境就好了,分给你吧。谢谢

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template