This is the file operation which happens when you delete a post:

Code
	$query = "
		select FILE_NAME,FILE_DIR
		from {$config['TABLE_PREFIX']}FILES
		where POST_ID = ?
	";
	$sth = $dbh->do_placeholder_query($query, array($Number), __LINE__, __FILE__);
	while (list($File, $dir) = $dbh->fetch_array($sth)) {
		if (!$dir) {
			unlink("{$config['ATTACHMENTS_PATH']}/$File");
		} else {
			unlink("{$config['FULL_PATH']}/gallery/$dir/full/$File");
			unlink("{$config['FULL_PATH']}/gallery/$dir/medium/$File");
			unlink("{$config['FULL_PATH']}/gallery/$dir/thumbs/$File");
		}
	}
SOURCE: scripts/deletepost.inc.php


unlink — Deletes a file
https://www.php.net/manual/en/function.unlink.php



Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com