<? Header("Content-type: image/jpeg"); if (@($f)): $width=500; $height=40; else: $width=500; $height=300; endif; $image = imagecreate($width, $height); // allocate colors $color_backgr = imagecolorallocate($image, 200, 200, 55); $color_grid = imagecolorallocate($image, 0, 0, 0); $color_plot = imagecolorallocate($image, 255, 0, 0); // clear image imagefilledrectangle($image, 0, 0, $width - 1, $height - 1, $color_backgr); // draw axes imagerectangle($image, 0, 0, $width - 1, $height - 1, $color_plot); // print some text imagestring($image, 5, 20, 7,$string, $color_grid); imagejpeg($image); imagedestroy($image); ?> 
 <!DOCTYPE html> <html lang="ru"> <head> <meta charset="UTF-8"> <title>Лабораторная работа #3</title> <link rel="stylesheet" href="css/styles.css"> </head> <body> <div class="center"> <? echo "<H1 align=center> Лабораторна робота №3 </H1>"; ?> <form action="index.php" method="post"> <input type="submit" value="Small" name="sub"> <input type="submit" value="BIG" name="unsub"> </form> <? if (@($unsub)): unset($sub); endif; if (!@($sub)): printf("<img src='l3.php'>"); else: printf("<img src='l3.php?f=1'>"); endif; ?> </div> </body> </html> 
  • Please post your comment to the question. - Sasha Chernykh

0