To give you more inside knowledge of the working of the File Genie PHP, here you can read all the available online tutorials!
File Genie PHP Tutorials
Display Files.
How do you display files from a folder on your server.
With the File Genie PHP you can display your uploaded files in a list. We will use the Folder List Server Behavior and the Folder List Repeater to display all the files in a folder.
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
To actually show the files on the page open up the Bindings panel and click on the + sign next to FolderList.
Select Name and Click on Insert. This will put the name of the file on your page. But only one.
- Apply Repeat
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 items on your page you want to repeat. (ps. If you want to list them underneith each other you should also include a <br>, you can do this by placing the cursor after the item and the press Shift-Enter, don't forget to also select this <br> before selecting the Repeater behavior)
2. Open up Folder List Repeater. You will find this behavior under Server Behaviors, DMXzone, File Genie, Folder List Repeater.
3. You can choose to display All Records or a specific number of records.
4. In your document it will look like the next image.
- Results
This will result in a list of file names of all the images in that folder.
Comments
Be the first to write a comment
You must me logged in to write a comment.