开发者

Can you list files in a directory with JavaScript but without ActiveX?

I wrote a script in php that allows me to get a list of files in a directory as an array, parse each one for a particular string, and then it displays all of the files that contain the search string.

My IT staff won't let me inst开发者_如何学编程all php on the server though. Can this be done with javascript without ActiveX? Everything I could find on this is pretty old.

Alternatively, is there a way to make php functions like opendir and readir work on a remote server?

Thanks


Nor JavaScript / ActiveX will help you do what you need to do if the directories are on a remote server. So no, can't be done.


This would be quite the security violation if you could. You will need to have something installed on the server that has file system access. If this is on an internal network, you may be able to simply enable directory browsing... but there aren't any client-side-only solutions to this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜