简体   繁体   English

是否可以从不同的 URL 中删除文件?

[英]Is it possible deleting files from a different URL?

I'm trying to figure out how I could delete a file from a different URL.我试图弄清楚如何从不同的 URL 中删除文件。

The situation is similar to the one below.情况与以下类似。

Eg: abc.com/admin/xyz-admin updates the content of xyz.com .例如: abc.com/admin/xyz-admin更新xyz.com的内容。

The website XYZ has the folders with images, so I want to delete files from there with abc.com/admin/xyz-admin . XYZ网站有带有图像的文件夹,所以我想用abc.com/admin/xyz-admin从那里删除文件。 I'm using Remote MySQL to connect the database.我正在使用远程 MySQL 连接数据库。

Thanks!谢谢!

You need to use FTP (or SFTP) or some protocol like that to log on to xyz.com and delete the files 'manually'.您需要使用 FTP(或 SFTP)或类似的协议登录到 xyz.com 并“手动”删除文件。

See the PHP documentation on FTP .请参阅FTP 上的 PHP 文档

Note that you would need an FTP server installed on xyz.com, and FTP is not a secure protocol.请注意,您需要在 xyz.com 上安装 FTP 服务器,并且 FTP 不是安全协议。

You could also use WebDAV, for which there are some PHP libraries like https://sabre.io/dav/davclient/ .您也可以使用 WebDAV,其中有一些 PHP 库,例如https://sabre.io/dav/davclient/ Again, you would need a WebDAV server on xyz.com同样,您需要 xyz.com 上的 WebDAV 服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM