SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Threaded View
-
Jun 13, 2007, 11:39 #1
- Join Date
- Jun 2007
- Location
- Internet
- Posts
- 12
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I have problems with my random images
I have problems with my random images, not show me an "imagen",
Here is the code
PHP Code:<?
function random_images($path) {
$F = 0;
$dir = opendir($path);
while ($file = readdir($dir)) { if (($file != ".") || ($file != "..")) { $archivos[$F] = $file; $F++; } }
$muestra = rand(1,$F);
return "<img src=/$path/$archivos[$muestra]>";
}
?>
<?
echo random_images("file_images/myimages");
?>
Thank youLast edited by jaesflo; Jun 13, 2007 at 17:08.
Bookmarks