使用PHP生成Windows .lnk文件 [英] Generate Windows .lnk file with PHP
问题描述
在创建帐户后,我们将创建一个帐户,用户会发送电子邮件,其中包含他们的账户详细信息和下载FileZilla或CyberDuck的说明,具体取决于他们的操作系统,通过用户代理字符串检测到。为了使事情更轻松新手,我想为FileZilla生成的.lnk文件的帐户登录详细信息作为参数,所以他们只需点击.lnk文件打开服务器。这不是关键功能,但更多的是技术挑战。
我的问题是:
$ ul
有没有其他的选择(例如用一个指向Filezilla可执行文件的脚本生成一个.bat文件)
以编程方式创建.lnk文件非常困难。请参阅此答案。
在FileZilla中,我认为你可以做的最好的事情是传递一个 filezilla.xml
文件,并描述必要的步骤在安装FileZilla后导入它。
I'm working on a project which involves an FTP server running ProFTPd and a PHP/MySQL backend that creates accounts for users.
Upon the creation of accounts, users are sent e-mails with their account details and instructions for downloading FileZilla or CyberDuck, depending on their OS, detected via user-agent string.
To make things easier for novices, I thought of having .lnk files generated for FileZilla with the account logins details as parameters, so they would just have to click on the .lnk files to open up the server. This is not a crucial feature but more of a technical challenge.
My questions are :
- is this even feasible ? are there any alternatives (eg. generating a .bat with a script pointing to the Filezilla executable ?)
- are there any issues, perhaps with relative / absolute paths pointing to the executable ?
- to go even further, what would be the simplest way of providing users with software with FTP access on a single account / single server (web interface is not an option).
It's very difficult to create .lnk files programmatically. See this answer.
In FileZilla, I think the best you can do reliably is to pass along a filezilla.xml
file, and describe the steps necessary to import it after FileZilla has been installed.
这篇关于使用PHP生成Windows .lnk文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!