File Genie PHP Tutorials

To give you more inside knowledge of the working of the File Genie PHP, here you can read all the available online tutorials!


Display Files with properties.

Previous TutorialTutorials IndexNext Tutorial

How do you display files from a folder on your server.

With the File Genie PHP Extension you can display your uploaded files with the name, size, date, etc. We will use the Folder List Server Behavior and Folder List Repeater.

How to do it

  •  Open page

    Open your php file where you need to display the files.

  •  Find the Folder List Server Behavior
  • You will find the Folder List Server Behavior under Bindings, Folder List.

  •  Apply the Folder List Server Behavior
  • In the Folder List Name enter the name of this Folder List object.
    In Folder Browse to the folder that holds the files you would like to display.
    By Allowed Extensions you can choose which files you want to display. In this case Images only.

  •  Click OK

    To apply the Folder List behavior click OK.
    A message box appears to tell you that the file called incFileGenie.php has been copied to your site in the ScriptLibrary folder. Click OK.

  •  Make layout of page

    1. Create a table with 3 columns and 2 rows.
    2. In the first row enter Name, Size and Date Last Modified in the three cells.
    3. Open up the Bindings panel. Put your cursor in the first cell of the second row, click on Name and insert. Repeat for the other 2 cells.

  •  Apply Repeat

    This will show one file on your page. To actually show all the image files in the images folder you need to apply the Folder List Repeater Server Behavior.

    1. To apply the Folder List Repeater select the item on your page you want to repeat. (in our case the second row)



    2. Open up Folder List Repeater. You will find this behavior under Server Behaviors, DMXzone, File Genie, Folder List Repeater.



  •  Results

    This will result in a table with a list of file names with their size and date of last modification (timedate is in linux format) of all the images in that folder.

Previous TutorialTutorials IndexNext Tutorial

Comments

Be the first to write a comment

You must me logged in to write a comment.