shurix Posted April 23, 2008 Report Share Posted April 23, 2008 Taatad probleema taaad, ka uz localhost apache servera skripts stradaa, bet uz nano hostinga nee. Paradaas shis kluudas pazinojums "Pievieno taču bildi!" Iedomajos ka varetu but kaut kas ar php versijaam. IF (filesize($_FILES["userfile"]["tmp_name"]) < "1048576") { $imagename = basename($_FILES['bilde']['name']); $newimage = "bildes/orginals/" . rand(1, 99999999) . $imagename; $result = @move_uploaded_file($_FILES['bilde']['tmp_name'], $newimage); IF(empty($result)) { echo "Pievieno taču bildi! <a href = 'java script:history.back()'> << Atpakaļ</a>"; } else { Link to comment Share on other sites More sharing options...
martins256 Posted April 23, 2008 Report Share Posted April 23, 2008 formai ir `enctype="multipart/form-data"` ? Link to comment Share on other sites More sharing options...
shurix Posted April 23, 2008 Author Report Share Posted April 23, 2008 Lūdzu nevajag taisīt muļķīgas QUOTEs Jap ir gan Link to comment Share on other sites More sharing options...
bubu Posted April 23, 2008 Report Share Posted April 23, 2008 Noņem @ simbolu nost no move_uploaded_file funkcijas. Un move_uploaded_file fjas rezultāts ir jāpārbauda nevis ar empty, bet gan ar vienādību uz true vai false. Link to comment Share on other sites More sharing options...
shurix Posted April 23, 2008 Author Report Share Posted April 23, 2008 Lūdzu nevajag taisīt muļķīgas QUOTEs Kaa tas vareetu izskatiities ar to true/false? Link to comment Share on other sites More sharing options...
marcis Posted April 23, 2008 Report Share Posted April 23, 2008 if(move_uploaded_file()==true){ ... }else{ ... } Link to comment Share on other sites More sharing options...
Recommended Posts