Re: Embedding image a PHP file
| From: | justin gruenberg | Date: | Sun, 29 Dec 2002 21:04:03 +0000 |
| Subject: | Re: Embedding image a PHP file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129610@lists.php.net to get a copy of this message | ||
yy.php should contain
<?php
header("Content-type: image/jpeg"); /* or gif or whatever... you can also take a look at getimagesize() to get the type of the image automatically */
readfile(THE FILE);
?>
it's extremely important that there is no whitespace before the <?php tag and after the ?> tag.
empty wrote:
Hi Anybody knows how to embed a image file to a php file, not as html; for example; <img src="yy.php" /> embedding a image file in yy.php file. Thanks everybody