当前位置:首页 > PHP教程 > PHP高级教程

php打开本地exe程序,js打开本地exe应用程序,并传递相关参数方法

实例如下:

<?
//include_once("inc/auth.inc.php");
include_once("inc/conn.php");
$html_page_title = _("运行");
include_once("inc/header.inc.php");
//路径如下
/*
 http://127.0.0.1/general/winexe/exe1.php?prog=c:/program files (x86)/tencent/qq/bin/qq.exe&name=qqqq
 
 */
//$prog="c:/program files (x86)/tencent/qq/bin/qq.exe";
//$name="aaaaa";
if(strstr($prog,"format"))
{
  message("",_("非法程序"));
  exit;
}
$prog=str_replace("/","\\",$prog);
?>
<script>
function win_run()
{
 coolrun.path="<?=$prog?>";
 coolrun.runpath();
 window.settimeout(' window.close();',3000);
}
</script>
 
<body class="bodycolor" onload="win_run()">
<br>
<div align="center" class="big1">
<h1><b><?=$name?></b><h1>
</div>
<object classid="clsid:4ab8ac1a-ae97-49ff-a74c-1f3c0cfc9870" id="coolrun" codebase="<?=myoa_js_server?>/static/js/coolrun.cab#version=1,0,0,0"></object>
</body>
</html>

以上这篇php打开本地exe程序,js打开本地exe应用程序,并传递相关参数方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持硕编程。


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!