douzi2749 2017-04-06 14:22
浏览 127

选择FTP下载的目标文件夹。 (HTML,jQuery或PHP)

I have written a script in PHP that connects to my FTP server and downloads the latest backup of all the websites I have created.

I have written this script in PHP (using ftp_get and all those lovely functions!), but I have also created a nice looking dashboard in HTML, which uses AJAX to not only execute the PHP code but to output all the "echo"'s into a textarea so I know which ones were successfully downloaded and which ones failed.

My problem is that I am not the only employee, there are quite a few of us who could execute this script, so on the dashboard I want there to be a way of choosing where these backsup are saved without having to edit a hardcoded destination in the PHP. At the moment, it's hardcoded to save to my desktop, but if someone else were to use it on their computer, it won't work.

I have tried searching for this, but no one has asked exactly the question I needed answering.

If the answers could be using HTML, JavaScript/jQuery or PHP, that would be handy.

Thank you in advance.

------------EDIT------------

Not sure people are understanding my problem, so I will try and explain it differently :)

I have a backup tool that will connect to an FTP server, go through each project folder and download the latest backup of that site. In total, there are at least 20 files to be downloaded.

Multiple people will be using this tool, depending who is around to backup the files.

Bob might want to save it directly to his desktop: C:/Users/Bob/Desktop.

Barbara might want to save it in C:/Users/Barbara/Backup Folder/2017/

Jimmy wants to save it in C:/Users/Jimmy/Projects/Project_name/Backup-01-01-2017

And I might want to save it onto an external HDD.

I want the tool to have a function that will allow the user to specify a location on their HDD where these files will all be saved.

I hope this is clearer.

Many thanks.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 运筹学排序问题中的在线排序
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥30 求一段fortran代码用IVF编译运行的结果
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥30 python代码,帮调试,帮帮忙吧