Jump to content
php.lv forumi

Bildes X un Y noteikshana


KillerBean

Recommended Posts

Skripts:

$i = 1;
while ($i <= 3) {
if (file_exists ( "bilde_".$i.".jpg" )) {

$imgname = "bilde_".$i.".jpg";

$im = @imagecreatefromjpeg($imgname);
if (!$im) {
$im = @imagecreatefromgif($imgname);
};
$x = imagesx($im);
$y = imagesy($im);

echo "
<a href=\"java script:nw('bilde_".$i.".jpg',".$x.",".$y.")\" border='0'><img src='bilde_".$lang."_".$i.".jpg' width='120' border='1'></a>
<br>
";
};
$i++;
};

 

Viss izpildaas, ja ir viena bilde (bilde_1.jpg)... ja uztaisa bilde_1.jpg kopju un paarsauc uz bilde_2.jpg...

skripts nomirst (die) pie rindinjas >> $im = @imagecreatefromjpeg($imgname);

kapeec taa??!

Link to comment
Share on other sites

×
×
  • Create New...