shurix Posted April 23, 2008 Report 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 {
martins256 Posted April 23, 2008 Report Posted April 23, 2008 formai ir `enctype="multipart/form-data"` ?
shurix Posted April 23, 2008 Author Report Posted April 23, 2008 Lūdzu nevajag taisīt muļķīgas QUOTEs Jap ir gan
bubu Posted April 23, 2008 Report 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.
shurix Posted April 23, 2008 Author Report Posted April 23, 2008 Lūdzu nevajag taisīt muļķīgas QUOTEs Kaa tas vareetu izskatiities ar to true/false?
marcis Posted April 23, 2008 Report Posted April 23, 2008 if(move_uploaded_file()==true){ ... }else{ ... }
Recommended Posts