Home > Backend Development > PHP Tutorial > Detailed explanation of the steps to pass parameters when opening a local exe application with php and js

Detailed explanation of the steps to pass parameters when opening a local exe application with php and js

php中世界最好的语言
Release: 2023-03-26 19:18:02
Original
2182 people have browsed it

这次给大家带来php与js打开本地exe应用程序传递参数步骤详解,php与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>
Copy after login

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

推荐阅读:

PHP装饰器模式使用案例分析

php+redis消息队列实现抢购步骤详解(附代码)

The above is the detailed content of Detailed explanation of the steps to pass parameters when opening a local exe application with php and js. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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