when I am displaying(PHP echo) an image name from the server,it’s shows like,
Resource id #32global_2012062513406170744fe83172d6c99.jpg
Resource id #33330394727_2012062613406707734fe90335d0a5e.jpg
How can I remove “Resource id #32” associated with image name? then only I can display the image from the server? Or there is any other way to display images?
code is
69 if(is_dir($dir))
70 {
71 $dir = opendir($dir);
72 while (false !== ($file = readdir($dir)))
73 {
74 if ($file != "." && $file != "..")
75 {
76 $files[] = $file;
77 }
78 }
79 closedir($dir);
80 }
81 //srand ((double) microtime( )*1000000);
82 $randnum = mt_rand(0,(sizeof($files)-1));
83 $img = $dir.$files[$randnum];
84 echo $img;
Thanks!
use this.