chore: version inicial del codigo fuente del LMS Estafeta
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?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;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user