Witam,


W katalogu glownym stworzylem plik test.php

  1. <?php
  2. function LoadJpeg($imgname)
  3. {
  4.    $im = @imagecreatefromjpeg($imgname); /* Attempt to open */
  5.    if (!$im) { /* See if it failed */
  6.        $im  = imagecreatetruecolor(150, 30); /* Create a black image */
  7.        $bgc = imagecolorallocate($im, 255, 255, 255);
  8.        $tc  = imagecolorallocate($im, 0, 0, 0);
  9.        imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
  10.        /* Output an errmsg */
  11.        imagestring($im, 1, 5, 5, "Error loading $imgname", $tc);
  12.    }
  13.    return $im;
  14. }
  15. header("Content-Type: image/jpeg");
  16. $img = LoadJpeg("img.jpg");
  17. imagejpeg($img);
  18.  
  19. ?>

w tym samym katalogu znajduje sie rownież plik img.jpg

Chce aby po wejsciu w adres url http://mojadomena.pl/test.php wyswietlil sie obrazek img.jpg Zamiast tego wyswietla sie adres url skryptu http://mojadomena.pl/test.php

Gdzie tkwi problem bo ten skrypt to chyba najprostrzy z mozliwych a ja nie moge wychwycic bledu sad.gif