Foren

Image Portlet DIsplay all images in a folder using php

Shail Rajput, geändert vor 11 Jahren.

Image Portlet DIsplay all images in a folder using php

New Member Beiträge: 12 Beitrittsdatum: 26.12.12 Neueste Beiträge
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


<!--?php
// Find all files in that folder
$files = glob('Images/*');

// Do a natural case insensitive sort, usually 1.jpg and 10.jpg would come next to each other with a regular sort
natcasesort($files);


// Display images
foreach($files as $file) {
   echo '<img src="' . $file . '" /-->';
}

// ???
// Profit :D
?&gt;







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