Location: PHPKode > projects > HypatiaDB > hypatiadb/xhr/deleteTempFile.php
<?php
include('../common_db.php');
include('../functions.php');
dbconnect($host, $username, $password);

header("Content-Type: application/xml");

$fname = $_REQUEST['name'];
//check that this is indeed a valid name
//(n.b.: we don't validate the first bit of the name,
//because this script executes from a different, poss-
//ibly indeterminate location from its caller)
if(preg_match('/database-export\.([a-zA-Z]{3,3})$/',$fname)) {
	@unlink($fname);
} else {
	//panique!
	error_log("$fname doesn't match validation regex!");
}

?>
Return current item: HypatiaDB