Example:
I have a file (/public/index.php) that is including my script (/public/pages/script.php). The file (/public/pages/script.php) should be deleting a file in another directory (/public/records/record.doc). What URL would I put in the unlink() function?
I've tried this and it doesn't seem to work:
$file = "record.doc";
$filename = ereg_replace(" ", "%20", $file);
$path = "../records/" . $filename;
echo $path;
chmod($path,0777);
if (unlink($path)) {
echo "<br>File deleted!";
} else {
echo "<br>Couldn't delete file.";
}
Anyone know what $path should equal?
