Guest User

Untitled

a guest
Jun 23rd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $outList.= outData($getList);
  2.  
  3. <?php
  4.  
  5. @$memcache = new Memcache;
  6. @$memcache->connect("localhost",11211);
  7.  
  8. function outData($getList)
  9. {
  10. $memVal = @$memcache->get(MD5($getList));
  11. if($memVal=='')
  12. {
  13. $results=mysql_query($getList)or die(mysql_error());
  14.  
  15. // then I do a bunch of stuff with the data
  16. @$memcache->set(MD5($getList), $memVal, false, 60000);
  17. }
  18. return $memVal;
  19. }
  20.  
  21. $memVal = @$memcache->get(MD5($getList));
  22. #Notice: Undefined variable: memcache in /home/topbit/736160.php on line 9
  23.  
  24. function outData($memcache, $getList)
Add Comment
Please, Sign In to add comment