开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜