Last active
February 13, 2017 19:23
-
-
Save kpion/e83fed41247be0801755983dbaeb6d33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create two files: | |
PHP file get_image.php: | |
<?php | |
//you'll play with dirs / paths later | |
$file = 'some_image.png'; | |
$type = 'image/png'; | |
header('Content-Type:'.$type); | |
header('Content-Length: ' . filesize($file)); | |
readfile($file); | |
////////////////////////// | |
html file index.html: | |
<img src = 'get_image.php'> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment