Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to read folders in a folder in Joomla?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 378
    Comment on it

    Hello friends,

    Today we will learn how to display all the folder within a folder in Joomla. In Joomla, folders() method is used to list all the folders within a folder. This function return an indexed array of the folders

    Syntax:

    JFolder::folders($path);

    $path is the path of the folder whose directories we need to display.

    Let's take an example to understand this. Suppose, we need to display all the directories within a components folder. We will write the following PHP script for the same:

    <?php
    $path=JPATH_ROOT.'/components/';
    print_r(Jfolder::folders($path));
    ?>

    Above code will display all the folders inside component folder in an indexed array form.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: