stencilz Posted May 23, 2007 Report Share Posted May 23, 2007 $file = $_FILES['file']['tmp_name']; $new_image = imagecreatefromjpeg($file); list($width,$height)=getimagesize($file); $newheight = 80; $newwidth = $width * $newheight / $height; $tmp = imagecreatetruecolor($newwidth,$newheight); imagecopyresampled($tmp,$new_image,0,0,0,0,$newwidth,$newheight,$width,$height); $filename = "done/".$_POST['cat']."/small/".$_FILES['file']['name'].""; imagejpeg($tmp,$filename,100); $filename ir 100% pareizs bet izmet Warning: imagejpeg(): Unable to open 'done/1/small/h.jpg' for writing in... lieki teikt ka nekāda h.jpg tur nemaz nav, tam ir jābūt tur izveidotam kas varētu būt par kļūdu? Link to comment Share on other sites More sharing options...
andrisp Posted May 23, 2007 Report Share Posted May 23, 2007 Pārbaudi pieejas tiesības. Link to comment Share on other sites More sharing options...
stencilz Posted May 23, 2007 Author Report Share Posted May 23, 2007 stulbs jautājums, bet kā tās pārbaudīt\mainīt uz localhost? man ir easyphp Link to comment Share on other sites More sharing options...
andrisp Posted May 23, 2007 Report Share Posted May 23, 2007 Ja tev ir linux, tad iekš konsoles ar ls -l vari apskatīt faila pieejas tiesības. Mainīt var ar chmod. Ja Windows, tad pieejas tiesības nav vainīgas, bet kas cits. Link to comment Share on other sites More sharing options...
stencilz Posted May 23, 2007 Author Report Share Posted May 23, 2007 (edited) atradu kļūdu, vnk mape bija drusku augstāk :) Edited May 23, 2007 by stencilz Link to comment Share on other sites More sharing options...
Recommended Posts