如何使用 PHP 代码删除文件系统上的文件?
<?php
if (isset($_GET['remove']) && is_numeric($_GET['remove']))
{
//Delete here using $_GET['remove'] value
}
if (isset($_POST['Submit']) && $_POST['Submit'] == 'Remove Selected')
{
$id = array();
$id = $_POST['removeid'];
//print_r($id);
if (count($id) > 0)
{
foreach ($id as $removeid)
{
//Delete here using $removeid value
}
}
}
?>