Skip to content

Commit

Permalink
Merge pull request #1 from nguyenanhung/develop
Browse files Browse the repository at this point in the history
Add test
  • Loading branch information
nguyenanhung authored Nov 5, 2018
2 parents d69655a + 15a0990 commit f0929f8
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### Munee .htaccess Code Start ####
RewriteRule ^(.*\.(?:css|less|scss|js|coffee|jpg|png|gif|jpeg))$ assets.php?files=/$1 [L,QSA,NC]
#### Munee .htaccess Code End ####
22 changes: 22 additions & 0 deletions assets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Project assets.
* Created by PhpStorm.
* User: 713uk13m <[email protected]>
* Date: 11/4/18
* Time: 01:17
*/
define('WEBROOT', __DIR__);
define('MUNEE_CACHE', __DIR__ . '/storage/tmp');
require_once __DIR__ . '/vendor/autoload.php';

// Echo out the response
echo \Munee\Dispatcher::run(
new \Munee\Request(
array(
'image' => array(
'checkReferrer' => FALSE
)
)
)
);
Binary file added resource/1-427x282.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<img src="/resource/1-427x282.jpg?resize=width[100]-height[50]">
</body>
</html>
8 changes: 8 additions & 0 deletions test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
/**
* Project assets.
* Created by PhpStorm.
* User: 713uk13m <[email protected]>
* Date: 11/4/18
* Time: 01:21
*/

0 comments on commit f0929f8

Please sign in to comment.