15 lines
605 B
PHP
15 lines
605 B
PHP
<?php
|
|
require_once __DIR__.'/auth_guard.php';
|
|
require_once("../config.php");
|
|
//$filelink = "http://localhost/git/estafeta-lms360/site/data/imgcat/tablero051594833914.png";
|
|
$filelink = $_POST["file"];
|
|
$filepath = getCurrentOrParentDirectory(parse_url ($filelink,PHP_URL_PATH) );
|
|
unlink($filepath);
|
|
function getCurrentOrParentDirectory( $filename )
|
|
{
|
|
echo '<p>'.$filename.'</p>';
|
|
$patharray = explode('/',$filename);
|
|
$path = $patharray[sizeof($patharray)-3].DIRECTORY_SEPARATOR.$patharray[sizeof($patharray)-2].DIRECTORY_SEPARATOR.$patharray[sizeof($patharray)-1];
|
|
return ROOTPATH.$path;
|
|
}
|
|
?>
|