moon 111 Posted April 2, 2008 Share Posted April 2, 2008 I have some code that displays all of the files in the directory as an image. What I want it to do is show all of the files in the directory not where the image is located but where it is being called (via image tag). <?php // create a 100*30 image $im = imagecreate(300, 300); // white background and blue text $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 255); // write the string at the top left $arr = scandir('.'); $i = 5; foreach($arr as $value) { imagestring($im, 2, 0, $i, $value, $textcolor); $i = $i+10; } // output the image header("Content-type: image/png"); imagepng($im); ?> How could I do that? Thanks Link to comment https://forums.phpfreaks.com/topic/99141-help/ Share on other sites More sharing options...
moon 111 Posted April 2, 2008 Author Share Posted April 2, 2008 *bump* Link to comment https://forums.phpfreaks.com/topic/99141-help/#findComment-507233 Share on other sites More sharing options...
lordfrikk Posted April 2, 2008 Share Posted April 2, 2008 What do you mean by "not where the image is located but where it is being called"? Link to comment https://forums.phpfreaks.com/topic/99141-help/#findComment-507260 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.