Salve ho questo codice implementato con le specifiche di register global=off:
<? session_start();
if ($_SESSION['login_staff'] != "ok") {
header("Location: login.php"); exit;
} else {
include "../connect.php";
$iddocenti = $_POST['iddocenti'];
$key = "iddocenti = $iddocenti";
$query = mysql_query("SELECT * FROM docenti WHERE $key");
$num = mysql_num_rows($query);
if ($num != 0) {
$row = mysql_fetch_array($query);
$path = "../files/docenti";
chmod ($path, 777);
$allegato = stripslashes(urldecode($row[allegato]));
if (file_exists("$path/$allegato")) { unlink("$path/$allegato"); }
else{ $query = mysql_query("DELETE FROM docenti WHERE $key"); }
}
header("Location: docenti_elenco.php");
exit;
} ?>
ma quando lo lancio mi da il seguente errore:
Warning: unlink(../files/docenti/): Permission denied in c:\inetpub\wwwroot\montess_new\backend\docenti_can c.php on line 16
Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\montess_new\backend\docenti_can c.php:16) in c:\inetpub\wwwroot\montess_new\backend\docenti_can c.php on line 20
in pratica uno riguarda i permessi della cartella ../files/docenti/ e l'altro il redirect su un'altra pagina, come posso risolvere i due errori???
VI CHIEDO URGENTE AIUTO!!!!
GRAZIE x ogni intervento