apache http server - deleting a file upon recieving a POST request
is this possible with apache http server? i wish to delete a local xml file upon recieving a post request from an another compu开发者_运维百科ter.
You could do that with PHP (or any other sript language, your apache server supports).
<?php
error_reporting(E_ALL ^ E_NOTICE);
if ($_POST['var']) unlink ('/path/to/file.xml');
?>
But you have to make sure then the POST request is sent to this PHP file. Do you know the URL the POST is send to?
精彩评论