duanlan2003 2010-04-15 14:13
浏览 117
已采纳

使用Internet Explorer通过浏览器获取文件夹路径

I would like to create a folder selector for my application which will only run on Internet Explorer Browsers (IE6+).

I would like to get the full folder path a user wishes to use via a HTML browse button or similar and then pass this to my server side application which is written in PHP! This can not be done via JavaScript for security reasons so I am looking for any other alternative that will work.

I had implemented a solution using a Java Applet but this did not work out as it didn't work on IE6, plus the browser security is locked down where I am deploying this app, meaning I am unlikely to get away with an applet.

The current solution is getting the user to paste in the folder location into a textfiel, this isn't acceptable any more.

Any implementation advice welcome!

Thanks all

  • 写回答

1条回答 默认 最新

  • doumi4974 2010-04-16 08:43
    关注

    If your app is IE only you can create a simple ActiveX Control with only one method:

     HRESULT BrowseForFolder([out] BSTR folderName);
    

    ATL Wizard will give you major portion of code.

    But I would consider using flash for this:

    1. It is more widely used then Java (I think so).

    2. ActiveX is strongly depends on browser's security options and more annoying to install.

    3. Your task is rather small, so it can be implemented without deep skills, if you not familiar with flash
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!