If you want a div around your image you have to do that in the html, you can't do that in the image generation code
If you are getting errors regarding the image, try browsing the image url http://localhost/php/test92.php and see what it looks like.
Does it show an image like you are expecting?