PHP Image Tutorial: Usually, we put image in a directory. Then, we call by using tag <img src="/path/to/image">. We can see clearly location and name of the image file. In this post, We will talk how to hide image and emmbed to our php line code. So, we will not put image file to a directory. It is nice idea!
We need class named "img2php". You can download at phpclasses.org/img2php. After download, follow this steps:
<?
require_once("img2php.class.php");
$t = new img2php;
$t ->generate("images");
?>
<? include "test.class.php"; $img = new gonximage(); $name = "action_forward_gif"; $img ->getImage($name); ?>
Now, point your browser to http://localhost/test/img2php/test.show.php.
Happy New Year!