john.brown Posted June 5, 2006 Report Share Posted June 5, 2006 Nu bet padod to img:<img src="smaller_pic.php?id=bildes_id">, Tad tanī smaller_pic.php no geta izņem id, ielasi no db bildi un taisi mazāku. No mysql izņemto bildi, par gd bildi taisi ar imagecreatefromstring(). Un viss rullēs. Tak manuālī viss tas ir... Link to comment Share on other sites More sharing options...
SkyD Posted June 5, 2006 Author Report Share Posted June 5, 2006 kāda starpība, uzliku, ka parāda piem šitā: http://adrese.lv/smaller_pic.php?pic=4143235135.jpg, tad šo 4143235135.jpg izvelk no mapes foto un parāda. Viss čikiniekā. Link to comment Share on other sites More sharing options...
john.brown Posted June 5, 2006 Report Share Posted June 5, 2006 Es sapratu, ka tev pašas bildes iekš db. A tā vispār prasti, tik pareizais id jāpadod ;)) Nu, jauki, ka rullē :) Link to comment Share on other sites More sharing options...
SkyD Posted June 6, 2006 Author Report Share Posted June 6, 2006 Parasti faila izmēru var dabūt ar filesize(); bet shoreiz uploadojot tas neder, jo fails veel neatrodas uz servera. Tāpēc, ja varat iedot manuāli, kur tas ir aprakstīts. Vai parasti php.ini settingos izmaina MAX_UPLOAD_SIZE vai kaa tur bija?!!? Link to comment Share on other sites More sharing options...
Delfins Posted June 6, 2006 Report Share Posted June 6, 2006 Pēc uploada fails ir uz servera! Un tad čeko atļauto size... Var arī formai iesetot max size: <input type="hidden" name="MAX_FILE_SIZE" value="xxx" /> <!--bytes--> Link to comment Share on other sites More sharing options...
SkyD Posted June 6, 2006 Author Report Share Posted June 6, 2006 Nu labi, ja es uzlieku <input type="hidden" name="MAX_FILE_SIZE" value="512000" /> <!-- 500kb --> Tad pārbaudīt, vai uploadotais fails nav lielaaks par $_POST['MAX_FILE_SIZE'] ???!! Bet, to man vajag paarbaudiit pirms fails nav uploadots. Link to comment Share on other sites More sharing options...
SkyD Posted June 6, 2006 Author Report Share Posted June 6, 2006 Vēl problēma tāda, ka ar unlink dzēšu bildes ārā. Dažreiz tiek izdzēsta bilde, dažreiz nē. Kad nedzēš uzrāda: Warning: unlink(foto/profile/wxmnzfele64f5rdf_20060606.jpg): Permission denied in C:\bla_bla\del_pic.php on line 18 Link to comment Share on other sites More sharing options...
bubu Posted June 6, 2006 Report Share Posted June 6, 2006 Permission denied Link to comment Share on other sites More sharing options...
SkyD Posted June 6, 2006 Author Report Share Posted June 6, 2006 Atļauja liegta?!!! Kkas tml? Un ko darīt.. ??!! Link to comment Share on other sites More sharing options...
bubu Posted June 6, 2006 Report Share Posted June 6, 2006 Greizz2zzT We33eeNazz. Link to comment Share on other sites More sharing options...
SkyD Posted June 6, 2006 Author Report Share Posted June 6, 2006 Tu domā, tas būtu pareizākais variants? Diez vai... Tālāk par slimnīcu ar to netiktu, i problēma neatrisināta paliktu. Citi ieteikumi varbūt ir? Link to comment Share on other sites More sharing options...
john.brown Posted June 6, 2006 Report Share Posted June 6, 2006 Striķis un ziepes... Drošāk. Bet paskaties tak kādi chmod stāv folderim un pašiem failiem. Ja esi caur ftp taisījis folderus vai lādējis bildes, tad visticamāk, ka folderi ir 755, a faili 644. Vajadzētu 777 un 666. Nomaini, un viss rukās. Link to comment Share on other sites More sharing options...
SkyD Posted June 6, 2006 Author Report Share Posted June 6, 2006 Viss man stāv uz kompi. Un, kā var chmod apskatīties? Link to comment Share on other sites More sharing options...
john.brown Posted June 6, 2006 Report Share Posted June 6, 2006 a kas tev win vai *nix? Link to comment Share on other sites More sharing options...
SkyD Posted June 7, 2006 Author Report Share Posted June 7, 2006 win. Link to comment Share on other sites More sharing options...
Recommended Posts