简体   繁体   中英

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.

The situation is similar to the one below.

Eg: abc.com/admin/xyz-admin updates the content of xyz.com .

The website XYZ has the folders with images, so I want to delete files from there with abc.com/admin/xyz-admin . I'm using Remote MySQL to connect the database.

Thanks!

You need to use FTP (or SFTP) or some protocol like that to log on to xyz.com and delete the files 'manually'.

See the PHP documentation on FTP .

Note that you would need an FTP server installed on xyz.com, and FTP is not a secure protocol.

You could also use WebDAV, for which there are some PHP libraries like https://sabre.io/dav/davclient/ . Again, you would need a WebDAV server on xyz.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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