LearnWebDesignOnline.com is proudly hosted by Hostmonster.com

There may be times where you need to copy a file to all sub-directories. One such example, is the php.ini file. The php.ini file contains settings affecting the behavior of PHP engine. You can edit the settings in the php.ini to alter, or override, the default PHP behavior. In many webhosts, this override will only affect the directory in which the php.ini is in. So if you have an application such as Joomla that consists of many subdirectories, you will need to copy this php.ini file to all sub-directories in the Joomla application.
Certainly, you can copy the file manually to all the sub-directories. However, there is a PHP script on tips-scripts.com that can perform that copy for you. Note that the script uses scandir() which is a PHP5 function. So if you don't have PHP5 on your webserver, you need to use the PHP4 alternative as shown in PHP Manual (scroll down on the page).