Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Shail Rajput
Image Portlet DIsplay all images in a folder using php
February 7, 2013 4:37 AM

Shail Rajput

Rank: New Member

Posts: 12

Join Date: December 26, 2012

Recent Posts

I have developed a portlet in php which will take all type of image in a folder and display it. I have installed this in my liferay but now i have a problem.
I need to dispaly all image which will be uploaded via image portlet so can any one tell me what sholud i do...
I dont want image gallery to b used.
so plz give me suggestion
 4// Find all files in that folder
 5$files = glob('Images/*');
 7// Do a natural case insensitive sort, usually 1.jpg and 10.jpg would come next to each other with a regular sort
11// Display images
12foreach($files as $file) {
13   echo '<img src="' . $file . '" />';
16// ???
17// Profit :D

so i want this to work for all images being uploaded....