gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Tā jau skaistāk Ja kas bilde nāk no citiem saitiem, ko tad man likt "bildes_nosaukums_katram_lietotajam_atsevisks" un /bildes/atrasanas/vieta/$sesijasbilde.jpg Quote Link to comment Share on other sites More sharing options...
bobsters Posted May 6, 2010 Report Share Posted May 6, 2010 blin pakustini smadzenes! $_SESSION["bilde"]="http://attela/atrasanas/vieta/bilde.formats"; un tad echo "<img src={$_SESSION["bilde"]}>"; Quote Link to comment Share on other sites More sharing options...
briedis Posted May 6, 2010 Report Share Posted May 6, 2010 Tu gribi parāk sarežģītas lietas priekš sava zināšanu līmeņa. Ej pamācies pamatus labāk. Google: php tutorials Quote Link to comment Share on other sites More sharing options...
bobsters Posted May 6, 2010 Report Share Posted May 6, 2010 pilnībā piekrītu briedis Quote Link to comment Share on other sites More sharing options...
gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Nu saprotu ka izbesīju :D Wnk man tikai jāsataisa šitais un viss! Es visu sapratu tikai bobster teica $_SESSION["bilde"]="http://attela/atrasanas/vieta/bilde.formats";'>http://attela/atrasanas/vieta/bilde.formats"; bet ko lai liek http://attela/atrasanas/vieta/bilde.formats vieta? jo visas bildes ir mysql datubāzē! bet kā lai norāda adresi bildei ja tā var būt jebkāda! Quote Link to comment Share on other sites More sharing options...
gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Nu kāds var pateikt kā kodu $_SESSION[bilde] ievietot lai no db paņemtu "bilde" ailes info? Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted May 6, 2010 Report Share Posted May 6, 2010 (edited) Krč reku viss ir: <?php function rt($size = 5) { $t = ""; for($i = 1; $i <= $size; $i++) { $t .= chr(rand(48, 122)); } return $t; } define('KUR_GLABAJAS_TAVAS_BILDES', "http://localhost/bildes/"); $bilde = KUR_GLABAJAS_TAVAS_BILDES . rt(rand(5, 20)) . '.jpg'; echo '<img src="' . $bilde . '" />'; ?> Pastāv iespējamība, ka dažreiz šo to arī parādīs... Edited May 6, 2010 by rATRIJS Quote Link to comment Share on other sites More sharing options...
gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Krč reku viss ir: <?php function rt($size = 5) { $t = ""; for($i = 1; $i <= $size; $i++) { $t .= chr(rand(48, 122)); } return $t; } define('KUR_GLABAJAS_TAVAS_BILDES', "http://localhost/bildes/"); $bilde = KUR_GLABAJAS_TAVAS_BILDES . rt(rand(5, 20)) . '.jpg'; echo '<img src="' . $bilde . '" />'; ?> Pastāv iespējamība, ka dažreiz šo to arī parādīs... Un atkal KUR_GLABAJAS_TAVAS_BILDES man glabājas mydql datubāze site, members, bilde. un ko tad? Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted May 6, 2010 Report Share Posted May 6, 2010 (edited) Pieliec šito sākumā (pašas pirmās rindas tavam php failam) un vajadzētu iet... <?php function gi($text = "TmVlc2kgY2lydmlzIC0gbWFhY2llcyE=") { $i = imagecreatetruecolor(250, 50); imagecolorallocate($i, 0, 0, 0); imagestring($i, 5, 10, 15, base64_decode($text), imagecolorallocate($i, 255, 255, 255)); imagepng($i); } header('Content-Type: image/png'); gi(); die(); ?> Edited May 6, 2010 by rATRIJS Quote Link to comment Share on other sites More sharing options...
bobsters Posted May 6, 2010 Report Share Posted May 6, 2010 Un atkal KUR_GLABAJAS_TAVAS_BILDES man glabājas mydql datubāze site, members, bilde. un ko tad? bet tu teici ka tev ir no citas adreses tu neteici ka tev DB glabajas tracina jau! pamekle pats ka attelot bildi no datubazes nesi sliņķis Quote Link to comment Share on other sites More sharing options...
gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Lab pateikšu visu kā ir Man ir DB ar nosaukumu site iekšā members un members sadaļa bilde. Site members site Kad džeks reģistrējas saitā viņš ievada bildes kodu, kuru piem. paņēma no googles. Džeks piereģistrējas un uzreiz aiziet uz DB sadaļā bilde tās bildes adrese! jautājums: Kā lai es dabūju lapā profils to bildes adresi kas ir DB Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 6, 2010 Report Share Posted May 6, 2010 Smagi... =D Var atkārtoties?? =) Quote Link to comment Share on other sites More sharing options...
gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Labāk nevajag :D Palīdzi :D Quote Link to comment Share on other sites More sharing options...
Леший Posted May 6, 2010 Report Share Posted May 6, 2010 Kā izņemt žirafu no ledusskapja? Quote Link to comment Share on other sites More sharing options...
gunmetal Posted May 6, 2010 Author Report Share Posted May 6, 2010 Kā izņemt žirafu no ledusskapja? izņem ziloni tad žirafi, ieliec atpakaļ ziloni un viss! 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.