sviesc Posted February 3, 2004 Report Share Posted February 3, 2004 man te tāds koda gabalins $all = "12"; $all_today = "123"; $unique = "1234": header("Content-Type:image/png"); $img = "counter.png"; $im = imagecreatefrompng ($img); $color = imagecolorallocate($im, 128, 0, 0); $color2 = imagecolorallocate($im, 201, 0, 0); $color3 = imagecolorallocate($im, 0, 107, 201); ImageString($im , 1, 36, 1, "$all", $color); ImageString($im , 1, 36, 21, "$unique", $color2); ImageString($im , 1, 36, 12, "$all_today", $color3); ImagePNG ($im); ImageDestroy ($im); ja es noņemu tos mainīgos vis ir ok, bet kā sāku lietot mainīgos tā bum nekas neiestājas un tikkai nezinu kā pareizi nodot parametrus kur kam jātrodas (textam) Link to comment Share on other sites More sharing options...
рпр Posted February 3, 2004 Report Share Posted February 3, 2004 liekas ka vajadzetu visam buuutok, tikai nesaprotu,kapeec string mainiigais jaaaliek veel peedinjaas? Link to comment Share on other sites More sharing options...
Aleksejs Posted February 3, 2004 Report Share Posted February 3, 2004 izlabo: $unique = "1234": kolu uz $unique = "1234"; semikolu Link to comment Share on other sites More sharing options...
Gacha Posted February 3, 2004 Report Share Posted February 3, 2004 Tu nu gan esi acīgs, ja apakšā nebutu pierakstījis "semikolu", tad es nemaz nebūtu pamanījis šķirbu starp abiem! :D Link to comment Share on other sites More sharing options...
sviesc Posted February 3, 2004 Author Report Share Posted February 3, 2004 ne tur tā vaina <? $1 = 11; $2 = 22; $3 = 33; header("Content-Type:image/png"); $img = "counter.png"; $im = imagecreatefrompng ($img); $color = imagecolorallocate($im, 128, 0, 0); $color2 = imagecolorallocate($im, 201, 0, 0); $color3 = imagecolorallocate($im, 0, 107, 201); ImageString($im , 1, 36, 1, "$1", $color); ImageString($im , 1, 36, 21, "$2", $color2); ImageString($im , 1, 36, 12, "$3", $color3); ImagePNG ($im); ImageDestroy ($im); ?> šito arī nedrukā ārā bet ja tos mainīgos izņem ārā vis i ok bet ar mainīgajiem nu ne par ko :( Link to comment Share on other sites More sharing options...
Kikko Posted February 3, 2004 Report Share Posted February 3, 2004 Paskaties vai tev pēc header() nemet ārā warningu, jo tad brauzeris domā ka tas paziņojums ir daļa no bildes. Arī pirms header() nedrīkst būt nekādas izvades no skripta, jo tas automātiski aizsūta kautkādus headerus. P.S. Es ceru ka $1 $2 $3 ir tikai piemēram, citāts no fm : Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. Link to comment Share on other sites More sharing options...
blackhalt Posted February 4, 2004 Report Share Posted February 4, 2004 šito arī nedrukā ārā bet ja tos mainīgos izņem ārā vis i ok bet ar mainīgajiem nu ne par ko :( Ja tev šito neizdrukās uz tās bildes, tad vai nu tev nav bildes vai nav GD http://paste.php.lv/734 Link to comment Share on other sites More sharing options...
sviesc Posted February 4, 2004 Author Report Share Posted February 4, 2004 vis ir čikiniekā paldies... :) Link to comment Share on other sites More sharing options...
Recommended Posts