vitalja Posted August 16, 2013 Report Share Posted August 16, 2013 /* $image == $_FILES['image'] (array) $directory == 'uploads/' (string) */ if ($file = Upload::save($image, NULL, $directory)) { $this->message = $file; $this->filename = strtolower(Text::random('alnum', 20)).'.jpg'; Image::factory($file) ->resize(200, 200, Image::AUTO) ->save($directory.$this->filename); // Delete the temporary file unlink($file); return $this->filename; } Labdien! Vai kāds varētu paskaidrot kāpēc nestrādā if statementa rindiņa, jeb Upload::save($image, NULL, $directory) bootstrap.php failā esmu aktivizējis image moduli. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted August 16, 2013 Report Share Posted August 16, 2013 Nu, piemēram, direktorijai kurā tu saglabā nav tiesību rakstīts. Vai arī tā neeksitē. Bet nu šitā var ilgi zīlēt kafijas biezumos. Jāskatās kādu kļūdas paziņojumu izmet Quote Link to comment Share on other sites More sharing options...
vitalja Posted August 16, 2013 Author Report Share Posted August 16, 2013 ErrorException [ 8 ]: Array to string conversion ~ SYSPATH/classes/Kohana/Log/Writer.php [ 81 ] Nezinu iespējams var kautkādā veidā ieslēgt normālos errorus, bet man nav izdevies to izdarīt, šis errors man parasti uzrādas sintakses kļudās. Savāds errors, jo system mapi es vispār neesmu aizticis. Quote Link to comment Share on other sites More sharing options...
Kavacky Posted August 16, 2013 Report Share Posted August 16, 2013 Uzliec atpakaļ PHP 5.3, bet, ja gribi atstāt 5.4, salabo. Kaut kur fix'u var atrast. Quote Link to comment Share on other sites More sharing options...
jurchiks Posted August 16, 2013 Report Share Posted August 16, 2013 (edited) Nafig 5.3? Varbūt labāk Kohana apdeitot? BTW, viņu issue tracker met 502, kaut kā nesmuki sanāk... Edited August 16, 2013 by jurchiks Quote Link to comment Share on other sites More sharing options...
vitalja Posted August 16, 2013 Author Report Share Posted August 16, 2013 Atrisināts! Tas komentārs par error palīdzēja es atradu veidu kā uzlikt skaidrākus error. bootstrap.php failā Kohana::init(array(.. vajadzēja error => False, un tad skaidrajā errorā es sapratu, ka chmod vajadzēja nomainīt. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.