forked from memcachier/examples-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
109 lines (98 loc) · 3.23 KB
/
index.php
File metadata and controls
109 lines (98 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP caching example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MemCachier PHP Example">
<meta name="author" content="MemCachier">
<link href="/bootstrap.min.css" rel="stylesheet" media="screen"/>
<style type="text/css">
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -60px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 60px;
}
#footer {
background-color: #f5f5f5;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
.container {
width: auto;
max-width: 680px;
}
.container .credit {
margin: 20px 0;
}
</style>
<link href="/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/html5shiv.js"></script>
<![endif]-->
<link rel="shortcut icon" href="/favicon.ico">
</head>
<body>
<!-- Part 1: Wrap all page content here -->
<div id="wrap">
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1>
PHP caching example
</h1>
</div>
<p class="lead">For any number N, we'll find the largest prime number
less than or equal to N. Because our implementation is incredibly basic, we
don't accept N greater than 10,000. When you submit the form, we'll check the
cache to see if we've calculated the largest prime for N. If we get a hit,
we'll return the results from the cache. If not, we'll do the calculation.</p>
<form action="">
<input type="text" id="n" />
<input type="button" value="Submit" data-compute="true" />
</form>
<p id="prime" class="lead text-info"></p>
</div>
</div>
<div id="footer">
<div class="container">
<p class="muted credit">Example by
<a href="http://www.memcachier.com">
<img class="brand" src="/memcachier-small.png" alt="MemCachier"
title="MemCachier" style="padding-left:8px;padding-right:3px;padding-bottom:3px;"/>
MemCachier
</a>
</p>
</div>
</div>
<script src="/jquery-1.7.2.js"></script>
<script src="/main.js"></script>
<script src="/bootstrap.js"></script>
</body>
</html>