*jancis38* Posted January 6, 2008 Author Report Posted January 6, 2008 nu pa defulto šitā ir. <img src="img/mapes/{map}.jpg" width="139" height="105" style='border:1px #000000 solid'> un viņš rāda.
andrisp Posted January 6, 2008 Report Posted January 6, 2008 Tev tur kaut kāda templeitošanas sistēma ir ?
marcis Posted January 6, 2008 Report Posted January 6, 2008 Sintakses errorus nemet? Jo tādiem tev tu pilns. <?php $map = "img/mapes/{map}.jpg"; $bilde = is_file($map) ? $map : "img/off.jpg"; echo "<img src=\"".$bilde."\" alt=\"bilde\" />"; ?> Bet nez ko tas {map} dara. Kas tas vispār tāds ir?
*jancis38* Posted January 6, 2008 Author Report Posted January 6, 2008 man abu bilžu vietā parādija "; ?>
ray Posted January 7, 2008 Report Posted January 7, 2008 (edited) <?php$bilde = file_exists('img/mapes/{map}.jpg' ) ? 'img/mapes/{map}.jpg' : 'img/off.jpg'; echo '<img src="', $bilde, '" alt="bilde" /.">'; ?> trūka "> beigās aiz [<img src="', $bilde, '" alt="bilde" /.] Edited January 7, 2008 by ray
Delfins Posted January 7, 2008 Report Posted January 7, 2008 Tu kodu vispār māki lasīt, ko esi uzrakstījis? Vieglākais samksāt kādam... nevis katru reizi postēt ar kodu, lai kāds izzīlētu, kas pa mainīgiem tev tur un kāda sistēma vispār.
mounkuls Posted January 8, 2008 Report Posted January 8, 2008 ray variantam punktiņš palicis labojot:) Par to {map} nav īsti skaidrības man arī.
Recommended Posts