mirror of
https://github.com/twisterarmy/cloud-server.git
synced 2025-09-11 13:22:12 +00:00
fix variables registry
This commit is contained in:
parent
6e2c4dc8f6
commit
55f505e6e4
@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
if (isset($_GET['hash'])) {
|
if (isset($_GET['hash'])) {
|
||||||
|
|
||||||
$filename = md5($_GET['hash']);
|
$fileName = md5($_GET['hash']);
|
||||||
$filepath = PROJECT_DIR . '/cache/image/' . $filename . '.jpeg';
|
$filePath = PROJECT_DIR . '/cache/image/' . $fileName . '.jpeg';
|
||||||
|
|
||||||
if (!file_exists($filepath)) {
|
if (!file_exists($filePath)) {
|
||||||
|
|
||||||
$icon = new Icon();
|
$icon = new Icon();
|
||||||
$image = $icon->generateImageResource($filename, 42, 42, false);
|
$image = $icon->generateImageResource($fileName, 42, 42, false);
|
||||||
|
|
||||||
file_put_contents($filepath, $image);
|
file_put_contents($filePath, $image);
|
||||||
}
|
}
|
||||||
|
|
||||||
$image = file_get_contents($filepath);
|
$image = file_get_contents($filePath);
|
||||||
|
|
||||||
header("Content-Type: image/jpeg");
|
header("Content-Type: image/jpeg");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user