php怎样调用windows的资源管理器 晕VB可以用API函数调用PHP好象不可以吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你利害,你是到底是想实现资源管理器的功能还是想调用它,你先要清楚PHP是一种于服务器端运行的脚本语言呀~ 可能楼主是想这样吧:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title>资源管理器-www.notle.Net</title><style><!--body, table, p, td, div { font:menu}select{ font:menu; color: red }--></style></head><body><table width=100% height=100%><tr><td valign=top width=50%><div id=driver style='color:blue'></td><td valign=top><select id=file size=2 style='width=100%;height:100%' onchange=exec(this.value)></select></td></tr></table><div id=popup style="z-Index:10;position:absolute;left:100px;top:200px;background:#808080;color:#ffffff;width:200px" align=center>处理中,请稍候</div><APPLET NAME=AppletActiveXComponent HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET><script>var num=0,fsofunction Clear(){file.length=0}function AddItem(txt,val){var op=document.createElement("option");op.text=txt;op.value=val;file.add(op);}function addDivHTML(DivName,Content){document.all(DivName).innerHTML+=Content}function Init(){var typeName=Array("Unknown","3.5软盘","本地磁盘","网络映射","光盘","RAM Disk");var AAXC=document.getElementsByName("AppletActiveXComponent").item(0);AAXC.setCLSID("Scripting.FileSystemObject");//AAXC.createInstance();fso = AAXC.GetObject();for (e = new Enumerator(fso.Drives); !e.atEnd(); e.moveNext()){d = e.item();if(d.IsReady){divName=encode(d.DriveLetter + ":")addDivHTML("Driver","<a href=\"javascript:SearchPath('" + divName + "')\">" + typeName[d.DriveType] + "(" + d.DriveLetter + ":)</a><br><div style='display:none' id='" + divName + "'></div>")}}SearchPath("c:")document.all("popup").style.display = "none"AAXC.setCLSID("Shell.Application")AAXC.createInstance();App = AAXC.GetObject();}function SearchPath(folder) {document.all('popup').style.display = ''folderspec=decode(folder)+"\\"if(document.all(folder).innerHTML==""){var f = fso.GetFolder(folderspec)for (e = new Enumerator(f.SubFolders); !e.atEnd(); e.moveNext()){d = e.item();divName=encode(folderspec + d.Name)var c=0,p=-1while((p=divName.indexOf('|',p+1))!=-1)addDivHTML(folder," ");addDivHTML(folder,"├<a href=\"javascript:SearchPath('"+divName+"')\">" + d.name + "</a><br><div style='display:none' id='" + divName + "'></div>")}}if(document.all(folder).style.display == "")document.all(folder).style.display = "none"elsedocument.all(folder).style.display = ""document.all('popup').style.display = 'none'filelist(folderspec)}function filelist(folderspec){Clear()var f = fso.GetFolder(folderspec)for (e = new Enumerator(f.files); !e.atEnd(); e.moveNext()){d = e.item();AddItem(d.Name,folderspec+d.Name);}}function encode(Str){var Tmp=""for(i=0;i<Str.length;i++){chr=Str.charAt(i)if(chr=='\\')Tmp+='|'elseTmp+=chr}return Tmp}function decode(Str){var Tmp=""for(i=0;i<Str.length;i++){chr=Str.charAt(i)if(chr=='|')Tmp+='\\'elseTmp+=chr}return Tmp}function exec(exeName){if(confirm("确实要执行?\n"+exeName))App.ShellExecute(exeName);}onload=new Function('setTimeout(Init,0)')</script></body></html> 刚开始学PHP,求指教 xml字符串解析 php如何获取checkbox权限组 求助xajax中怎样输出中文 请教下我的判断语句是什么地方错了 discuz安装时检测服务器不支持mysql 我也问个正则表达式问题:怎么匹配这样的字符串 如何用正则表达式分离网页中html标签中的内容? 请推荐一个支持php+mysql的空间 我一用session就出问题,请帮忙看看。 php如何调用linux的shell命名,windows的doc命令 哀求!能否在PHP4中通过修改某些设置而使用后缀为*.php3的文件,并求好使的phpmychat1.0,要带install文件夹的.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>资源管理器-www.notle.Net</title>
<style>
<!--
body, table, p, td, div { font:menu}
select{ font:menu; color: red }
-->
</style>
</head>
<body>
<table width=100% height=100%>
<tr>
<td valign=top width=50%><div id=driver style='color:blue'></td>
<td valign=top>
<select id=file size=2 style='width=100%;height:100%' onchange=exec(this.value)>
</select>
</td>
</tr>
</table>
<div id=popup style="z-Index:10;position:absolute;left:100px;top:200px;background:#808080;color:#ffffff;width:200px" align=center>处理中,请稍候</div>
<APPLET NAME=AppletActiveXComponent HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>
<script>
var num=0,fso
function Clear(){
file.length=0
}
function AddItem(txt,val){
var op=document.createElement("option");
op.text=txt;
op.value=val;
file.add(op);
}
function addDivHTML(DivName,Content){
document.all(DivName).innerHTML+=Content
}
function Init(){
var typeName=Array("Unknown","3.5软盘","本地磁盘","网络映射","光盘","RAM Disk");
var AAXC=document.getElementsByName("AppletActiveXComponent").item(0);
AAXC.setCLSID("Scripting.FileSystemObject");//
AAXC.createInstance();
fso = AAXC.GetObject();
for (e = new Enumerator(fso.Drives); !e.atEnd(); e.moveNext()){
d = e.item();
if(d.IsReady){
divName=encode(d.DriveLetter + ":")
addDivHTML("Driver","<a href=\"javascript:SearchPath('" + divName + "')\">" + typeName[d.DriveType] + "(" + d.DriveLetter + ":)</a><br><div style='display:none' id='" + divName + "'></div>")
}
}
SearchPath("c:")
document.all("popup").style.display = "none"AAXC.setCLSID("Shell.Application")
AAXC.createInstance();
App = AAXC.GetObject();
}
function SearchPath(folder) {
document.all('popup').style.display = ''
folderspec=decode(folder)+"\\"
if(document.all(folder).innerHTML==""){
var f = fso.GetFolder(folderspec)
for (e = new Enumerator(f.SubFolders); !e.atEnd(); e.moveNext())
{
d = e.item();
divName=encode(folderspec + d.Name)
var c=0,p=-1
while((p=divName.indexOf('|',p+1))!=-1)addDivHTML(folder," ");
addDivHTML(folder,"├<a href=\"javascript:SearchPath('"+divName+"')\">" + d.name + "</a><br><div style='display:none' id='" + divName + "'></div>")
}
}if(document.all(folder).style.display == "")
document.all(folder).style.display = "none"
else
document.all(folder).style.display = ""document.all('popup').style.display = 'none'
filelist(folderspec)
}function filelist(folderspec){
Clear()
var f = fso.GetFolder(folderspec)
for (e = new Enumerator(f.files); !e.atEnd(); e.moveNext())
{
d = e.item();
AddItem(d.Name,folderspec+d.Name);
}
}
function encode(Str){
var Tmp=""
for(i=0;i<Str.length;i++){
chr=Str.charAt(i)
if(chr=='\\')
Tmp+='|'
else
Tmp+=chr
}
return Tmp
}function decode(Str){
var Tmp=""
for(i=0;i<Str.length;i++){
chr=Str.charAt(i)
if(chr=='|')
Tmp+='\\'
else
Tmp+=chr
}
return Tmp
}
function exec(exeName){
if(confirm("确实要执行?\n"+exeName))
App.ShellExecute(exeName);
}onload=new Function('setTimeout(Init,0)')
</script></body></html>