Ciao raga, ho un problema con l'upload automatico di file... praticamente l'upload funziona se mettio file uguali o minori di 2-3Mb. Ho provato poi ad inserire file superiori ai 5Mb ma il risultato è una pagina completamente bianca, oppure mi appare un tipico messaggio di errore del browser "Connessione annullata"... non so come fare, vi prego AIUTATEMI! :lacrime:

Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>Salva Video</title>
  <meta http-equiv="content-type" content="text/html;charset=windows-1252">
 </head>
 <body>

<?php

$db_host
="localhost";
$db_name="my_thedoors";
$db_user="thedoors";
$db_password="";

$db=mysql_connect($db_host,$db_user,$db_password);
if (
$db==false) die("Errore nella connessione al database!");

mysql_select_db($db_name,$db)
or die(
"Errore nella selezione del database!");

$query="CREATE TABLE IF NOT EXISTS upvideo (
id INT NOT NULL auto_increment,
titolo VARCHAR(30) NOT NULL,
commento TEXT(1000) NOT NULL,
video VARCHAR(50) NOT NULL default 0,
PRIMARY KEY (id) )"
;

mysql_query($query,$db)
or die(
"Errore invio query!");

$titolo=$_POST['titolo'];
$commento=$_POST['commento'];
$commento=str_replace("<","&lt;",$commento);
$commento=str_replace(">","&gt;",$commento);
$commento=nl2br($commento);

ini_set(”memory_limit”“16M”);

if (isset(
$_POST["invio"])) {
  
$percorso "video/";
  if (
is_uploaded_file($_FILES['file1']['tmp_name'])) {
    if (
move_uploaded_file($_FILES['file1']['tmp_name'], $percorso.$_FILES['file1']['name'])) {
      echo 
'Nome file: [b]'.$_FILES['file1']['name'].'[/b]
'
;
      echo 
'MIME Type: [b]'.$_FILES['file1']['type'].'[/b]
'
;
      echo 
'Dimensione: [b]'.$_FILES['file1']['size'].'[/b] byte
'
;
      echo 
'======================
'
;
      echo 
'File caricato correttamente

'
;
      echo 
'[url="upload.htm"]Torna indietro[/url]';
    } else {
      echo 
"si è verificato un errore durante l'upload: ".$_FILES["file1"]["error"];
    }
  } else {
    echo 
"si è verificato un errore durante l'upload: ".$_FILES["file1"]["error"];
  }
}

$video=$percorso.$_FILES['file1']['tmp_name'];

$query="INSERT INTO upvideo (titolo,commento,video) VALUES ('$titolo','$commento','$video')";

mysql_query($query,$db)
or die(
"Errore nell'inserzione!");

mysql_close($db);

?>

</body>
</html>
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> PHP upload test page </title>
<meta http-equiv="content-type" content="text/html;charset=windows-1252;">
</head>
<body style="text-align:center;">
    <form enctype="multipart/form-data" method="post" action="svideo.php" name="uploadform">
     <table border="1" style="text-align:center;margin-right:auto;margin-left:auto;">
	  <tr>
	   <td></td><td>Inserzione Video</td>
	  </tr>
	  <tr>
	   <td>Titolo: </td><td><input type="text" name="titolo" value="" size="33"></td>
	  </tr>
	  <tr>
	   <td>Commento: </td><td><textarea rows="6" cols="25" name="commento" value="" ></textarea></td>
	  </tr>
	  <td>Selezione video: </td><td><input type="file" name="file1" size="21"></textarea></td>
	  </tr>
      <tr>
	   <td><input type="submit" value="Invia"></td>
	  </tr>
	 </table>
    </form>
</body>
</html>