1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/misc/others/uninstall-delete-matomo-directory.php
Stefan Giehl 75290a04f4 Use https URLs (#23072)
* Use https URLs

* Build vue files

* use matomo.org instead of piwik.org in some links

* updates expected UI test file

---------

Co-authored-by: innocraft-automation <innocraft-automation@users.noreply.github.com>
2025-02-27 16:34:08 +01:00

30 خطوط
1.2 KiB
PHP

<?php
exit; // Remove this line before using the script
// How to remove the matomo/ directory if it does not work in FTP?
// 1) Download and upload this file to your webserver
// 2) Remove the 2nd line (the "exit;")
// 3) Put this file in the folder that contains the matomo/ directory (above the matomo/ directory)
// For example if the matomo/ folder is at https://your-site/matomo/ you put the file in https://your-site/uninstall-delete-matomo-directory.php
// 4) Go with your browser to https://your-site/uninstall-delete-matomo-directory.php
// 5) The folder https://your-site/matomo/ should now be deleted!
// We hope you enjoyed Matomo. If you have any feedback why you stopped using Matomo,
// please let us know at hello@matomo.org - we are interested by your experience
function unlinkRecursive($dir)
{
if (!$dh = @opendir($dir)) return "Warning: folder $dir couldn't be read by PHP";
while (false !== ($obj = readdir($dh))) {
if ($obj == '.' || $obj == '..') {
continue;
}
if (!@unlink($dir . '/' . $obj)) {
unlinkRecursive($dir . '/' . $obj, true);
}
}
closedir($dh);
@rmdir($dir);
return "Folder $dir deleted!";
}
echo unlinkRecursive('matomo/');