Home  >  Article  >  Backend Development  >  PHP and JS open local exe program and pass relevant parameters method

PHP and JS open local exe program and pass relevant parameters method

小云云
小云云Original
2018-02-06 15:41:562770browse

本文主要为大家分享一篇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>
<p align="center" class="big1">
<h1><b><?=$NAME?></b><h1>
</p>
<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>

相关推荐:

js函数的按值传递参数

html怎样实现页面跳转时传递参数

php引用定义和引用传递参数实例用法详解

The above is the detailed content of PHP and JS open local exe program and pass relevant parameters method. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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