這次給大家帶來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>
相信看了本文案例你已經掌握了方法,更多精彩請關注php中文網其它相關文章!
推薦閱讀:
PHP裝飾器模式使用案例分析
php+redis訊息佇列實現搶購步驟詳解(附代碼)