Jackal Posted June 5, 2006 Report Share Posted June 5, 2006 (edited) Nu nekādīgi nesanāk šito skriptu uzrakstīt pareizi. Kas šajā skriptā ir nepareizi? Nekādus errorus nerāda vienkārši parāda, ka neizdevās uploadot failu if($_SERVER['REQUEST_METHOD'] =='POST'){ foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"][$key]; if ($_FILES['pictures']['type']=="pictures/jpeg" || $_FILES['pictures']['type']=="pictures/png"){ move_uploaded_file($tmp_name, "C:\Web Page\EasyPHP1-8\www\bitbucket/$name"); echo "File ".$name." have been uploaded successfully"; echo '<br>Your file is here <a href="bitbucket.php?id='.$name.'">'; echo "/bitbucket/".$name.'</a>'; } else { echo "neizdevâs"; } } } } Edited June 9, 2006 by Jackal Link to comment Share on other sites More sharing options...
v3rb0 Posted June 5, 2006 Report Share Posted June 5, 2006 mimetypes pareizi? echo $_FILES['pictures']['type']; pieliec. Link to comment Share on other sites More sharing options...
Kavacky Posted June 5, 2006 Report Share Posted June 5, 2006 MIME Types tak normāli ir image/bla. Link to comment Share on other sites More sharing options...
SkaKri Posted June 6, 2006 Report Share Posted June 6, 2006 move_uploaded_file($tmp_name, "C:\Web Page\EasyPHP1-8\www\bitbucket\".$name"); Link to comment Share on other sites More sharing options...
Recommended Posts