Home

Wednesday, July 13, 2011

Read files name in folder using php

<?php
                $dir = realpath('images/big');
                $images = scandir($dir);
                foreach ($images as $image)
                {
                    if (substr($image, 0, 1) != '.')
                    {
                        ?>
                        <li>
                            <a href="images/big/<?=$image;?>">
                                <img src="images/thumb/<?=$image;?>"/>
                            </a>
                        </li><?
                     
                    }
                }
                ?>

No comments:

Post a Comment

rathoddhirendra.blogspot.com-Google pagerank and Worth