Swear Posted August 29, 2008 Report Share Posted August 29, 2008 Nu lieta tāda... Pēc visādiem tutorialiem uztaisiju skriptu kurš uztaisa bildi pēc ievadītā bet lapa kura izveido pašu bildi viņai header ir Content-type: image/png tapēc nekā tur nekā rakstiska nevar pievienot un ja nav type image tad bildes vietā visadi ķeburi sanāk bet es gribetu lai bilde ir tajā pašā galvenajā lapā bet galigi nevar izdomat kā to izdarīt! :( mans rezultāts: http://ultimate.oo.lv/sig2/ bet gribētos kā piemēram šeit: http://sigmaker.gladiatus-team.pl/lv/ .. cerams ka izstāstiju pietiekami saprotami.. index.php satur formas šitādā garā: <form action="sig.php" method="get"> <input type="text" name="name" value="-" /> sig.php satur bildes izveidosanu un uzrakstus... <?php header("Content-type: image/png"); $name = (isset($_GET['name'])) ? $_GET['name'] : "-"; $skype = (isset($_GET['skype'])) ? $_GET['skype'] : "-"; $s = (isset($_GET['s'])) ? $_GET['s'] : "-"; $klan = (isset($_GET['klan'])) ? $_GET['klan'] : "-"; //tekstus// imagepng($bilde); // outputing PNG image to file cache imagedestroy($bilde); // destroy image Link to comment Share on other sites More sharing options...
Aleksejs Posted August 29, 2008 Report Share Posted August 29, 2008 Nu kā... <img src="http://ultimate.oo.lv/sig2/sig.php?name=superVecis&skype=CS_RULZ&s=Za_SERWER&klan=megaKlans" alt=""/> Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 nu jā bet kā lai es to dabuju tajā pašā lapā man vajag bildei ?name=$name un name viņš _GET bet no kurienes lai viņš viņu geto? Link to comment Share on other sites More sharing options...
Aleksejs Posted August 29, 2008 Report Share Posted August 29, 2008 Liec formai izsaukt šo pašu index.php un nevis sig.php un apakšā norādi: '<img src="sig.php?name=' . $_GET['name'] ... Tādā veidā būsi padevis šos parametrus gan index, gan sign Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 nu mēģināju bet nesanāk... forma dodas uz pašu index.php un bildi meģinu šādi: <img src="sig.php?name=<?$name?>&skype=<?$skype?>&s=<?$s?>&klan=<?$klan?>" bet pēc = sanāk tukšumi kautgan pāšā augšā ir: <?php $name = (isset($_GET['name'])) ? $_GET['name'] : "-"; $skype = (isset($_GET['skype'])) ? $_GET['skype'] : "-"; $s = (isset($_GET['s'])) ? $_GET['s'] : "-"; $klan = (isset($_GET['klan'])) ? $_GET['klan'] : "-"; ?> links pamainas nospiežot uz submit kā vajag (index.php?name=ka vaig un bla bla bla) bet īsti negribētos lai tas rādas adresē.. kā lai panāk tieši kā piemēra adresē 1. postā? Link to comment Share on other sites More sharing options...
Aleksejs Posted August 29, 2008 Report Share Posted August 29, 2008 Padot uz index.php caur POST Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 (edited) Padot uz index.php caur POST nu tas atrisina to ka nerādas links bet kaut kas nav kārtībā te: <img src="sig.php?name=<?$name?>&skype=<?$skype?>&s=<?$s?>&klan=<?$klan?>" jo pad tad ja sākumā uzliek $name = "tests" nekas nemainas paliek tik tukšums... Edited August 29, 2008 by Swear Link to comment Share on other sites More sharing options...
Aleksejs Posted August 29, 2008 Report Share Posted August 29, 2008 parādi pilnu index.php Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 http://paste.php.lv/7921?lang=php Link to comment Share on other sites More sharing options...
xPtv45z Posted August 29, 2008 Report Share Posted August 29, 2008 Tev jau šeit arī nenotiek izvade - <?$name?> Nepieciešams <? echo $name?> vai <?=$name?> Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 nu itkā ir bet strādā tikai ar GET... ar POST pilnigi nereaģē :( Link to comment Share on other sites More sharing options...
Aleksejs Posted August 29, 2008 Report Share Posted August 29, 2008 Un šajā vietā: <?php $name = (isset($_GET['name'])) ? $_GET['name'] : "-"; $skype = (isset($_GET['skype'])) ? $_GET['skype'] : "-"; $s = (isset($_GET['s'])) ? $_GET['s'] : "-"; $klan = (isset($_GET['klan'])) ? $_GET['klan'] : "-" ?> nomainīji uz: <?php $name = (isset($_POST['name'])) ? $_POST['name'] : "-"; $skype = (isset($_POST['skype'])) ? $_POST['skype'] : "-"; $s = (isset($_POST['s'])) ? $_POST['s'] : "-"; $klan = (isset($_POST['klan'])) ? $_POST['klan'] : "-" ?> Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 PERFEKTI!!! LIELS Paldies! Uzzināju tieši to ko man vajdzēja! Link to comment Share on other sites More sharing options...
Swear Posted August 29, 2008 Author Report Share Posted August 29, 2008 vel 1 jautājums? kā man panākt ja ?download=1 lai viņš pieprasa to bildi download? es mēģināju sig.php ievietot: $download=$_GET['d']; if($download=="1") { header('Content-Description: File Transfer'); header('Content-Type: image/png'); header('Content-Length: ' . filesize($file)); header('Content-Disposition: attachment; filename='$file'); readfile($file); } header("Content-type: image/png"); utt bet nestrada... kas par vainu? Link to comment Share on other sites More sharing options...
march Posted August 29, 2008 Report Share Posted August 29, 2008 Nebūtu pareizāk: header('Content-Disposition: attachment; filename='.$file); ? Link to comment Share on other sites More sharing options...
Recommended Posts