Advertisement
stixlink

index.php

Jul 10th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. require_once('./services/ManageCache.php');
  3. require_once('./wrappers/SMemcache.php');
  4. ?>
  5. <!DOCTYPE html>
  6. <html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
  7. <head>
  8.     <meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" />
  9.     <meta name = "language" content = "en" />
  10.     <title>Страница с кеш данными</title>
  11. </head>
  12.  
  13. <body>
  14. <?php
  15.  
  16. $cache = new \services\ManageCache(new \wrappers\SMemcache());
  17. $im = $cache->get('imageCache');
  18. if (!$cache) {
  19.     $im = \ImageCreate(200, 100)
  20.     or die ("Ошибка при создании изображения");
  21.     $im = \ImageColorAllocate($im, 255, 0, 0);
  22. }
  23. header("Content-type: image/png");
  24. imagejpeg($im);
  25. ?>
  26. </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement