Ciao, non riesco a creare la dir dove salvarci i file uplodati. Credo sia un problema di permessi.
Apache e' su WinXP Pro.
Il log dell'errore e' il seguente:
Warning: Unable to create 'upload/': Permission denied in e:\programmi\apache group\apache\websites\dalla\sito\do_upload.php on line 7
Warning: Unable to create 'upload/': Permission denied in e:\programmi\apache group\apache\websites\dalla\sito\do_upload.php on line 12
Warning: Unable to move '/tmp\php86.tmp' to 'upload/' in e:\programmi\apache group\apache\websites\dalla\sito\do_upload.php on line 12
Codice PHP:
1:<?php
2:
3:mkdir ("upload/", 777);
4:
5:// In PHP 4.1.0 or later, $_FILES should be used instead of $HTTP_POST_FILES.
6:if 7:(is_uploaded_file($HTTP_POST_FILES['scheda']['tmp_name'])) {
copy($HTTP_POST_FILES['scheda']['tmp_name'], "upload/");
} else {
echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES['scheda']['name'];
}
/* ...or... */
12:move_uploaded_file($HTTP_POST_FILES['scheda']['tmp_name'], "upload/");
?>
Ho notato che la dir upload viene creata nella home del mio sito.
Nel file php.ini la variabile upload_tmp_dir = /tmp.
ciao
cialz