adesso faccio un pò di altreprove, in effetti ho notato che quando faccio l'upload in locale funziona,ma ho provato a pubblicarlo e mi da sempre errore
guarda cosi faccio, l'upload del file che poi cerco anche di eliminare
secondo te il problema potrebbe essere lo stesso??codice:<?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { // UPLOAD $path="../../pdf"; if( $UploadedFile != none AND $UploadedFile_type != "pdf") { print("Percorso locale: $UploadedFile \n"); print("Nome del file: $UploadedFile_name \n"); print("Dimensione del file: $UploadedFile_size \n"); print("Tipo di file: $UploadedFile_type \n"); print("<HR>"); if (copy( $UploadedFile , "$path/$UploadedFile_name")) { $insertSQL = sprintf("INSERT INTO settore_eco_pdf (descrizione, file, pop) VALUES (%s, %s, %s)", GetSQLValueString($_POST['descrizione'], "text"), GetSQLValueString($_POST['hiddenField'], "text"), GetSQLValueString($_POST['radiobutton'], "text")); }else{ print "Errore.. upload non riuscito "; print ("NON E' UNFILE PDF \n"); } }else{ print "Errore.. nessun file. "; } mysql_select_db($database_actionlab, $actionlab); $Result1 = mysql_query($insertSQL, $actionlab) or die(mysql_error()); $insertGoTo = "../success.php?success=PDF INSERITO CON SUCCESSO!"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?>
:master:

Rispondi quotando