How to do Pagination in PHP easily

Pagination in PHP is easy and you can show pagination by following code. There are 4 files (don’t go to the number of files, separate sfiles have been created so that you can easily understand the code), I could have combined it in 1 but 4 seems to be better. These are: index.php, paging.php, function.php, … Read more

Count Number of Files in Directory and Subdirectories

Count number of files in a directory and it’s subdirectories. Use the following code to count number of files. [php] <h1>Count Number of Files in Directory and Subdirectories</h1> <?php $dirnam=dirname(__FILE__); //No Trailing Slash// function count_files($dirpath, &$count) { $directorynames = glob($dirpath.’/*’); if(!empty($directorynames)) { foreach($directorynames as $directoryname) { if(is_dir($directoryname)) { $count[‘dirs’]++; count_files($directoryname, $count); } if(is_file($directoryname)) { $count[‘files’]++; … Read more