ah ok :D veré si encuentro algo, gracias
edit:
ejalé ya lo encontré
index.php
Código PHP:
<html>
<head>
<script language="javascript" type="text/javascript">
function MyAjax() {
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function ClearHTML(sHTML) {
sHTML = sHTML.replace(/<[^>]*>/gi, "");
sHTML = sHTML.replace( /n/gi, "") ;
sHTML = sHTML.replace(/ /gi, "");
return sHTML;
}
</script>
<script language="Javascript" type="text/javascript">
//mensaje de alerta
function mensaje()
{
var miAjaxObj = MyAjax();
miAjaxObj.open("GET","borrar.php",true);
miAjaxObj.send(null);
alert("todos los archivos que ingresó fueron borrados");
}
</script></head>
<body onunload="mensaje();">
</body>
</html>
borrar.php
Código PHP:
<?php
$filename = 'a.txt';
if(@file_exists($filename))
{unlink('a.txt');}
?>