-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
59 lines (42 loc) · 1.41 KB
/
Copy pathindex.php
File metadata and controls
59 lines (42 loc) · 1.41 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
<?php
/**
* This file contains few simple usecases which allow to test how script works.
*/
define('DS', DIRECTORY_SEPARATOR);
// Simple helper
class ResizeHelper {
public static function getUrl($path, $width, $height) {
return "/resizer/{$width}x{$height}/{$path}";
}
}
?>
<style>
img {
border : 1px solid black;
margin : 20px;
}
</style>
<img src="<?php echo ResizeHelper::getUrl('/images/small.jpg', 100, 100); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/small.jpg', 100, 200); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/small.jpg', 200, 200); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/small.jpg', 600, 350); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/small.jpg', 300, 300); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/small.jpg', 400, 400); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/big.jpg', 100, 100); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/big.jpg', 100, 200); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/big.jpg', 200, 200); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/big.jpg', 600, 350); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/big.jpg', 300, 300); ?>" />
<br />
<img src="<?php echo ResizeHelper::getUrl('/images/big.jpg', 400, 400); ?>" />
<br />