Re: unlik by sending variabel?
| From: | Simon Garner | Date: | Tue, 20 Feb 2001 21:07:57 +0000 |
| Subject: | Re: unlik by sending variabel? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40813@lists.php.net to get a copy of this message | ||
From: "Jan Grafström" <jan@lillemanshus.com>
> Hi!
> I am trying to get a file deleted when I send a variabel with the value
> "delete".
> I have this file:
>
> -----
> $message = ereg_replace("\r","", $message);
> $message =
> "<list><med>$message</med><nam>$name</nam></list>;
> $fp = fopen (basename($PHP_SELF) . ".xml", "a");
> fwrite ($fp, $string);
> fclose ($fp);
> -----
>
> and the file I want unlnked is the .xml-file
>
> I am very thankful if I can get any help with this.
> Regards jan
Try:
<?
system("rm $file");
?>
:-)