留言板

Image Portlet DIsplay all images in a folder using php

Shail Rajput,修改在11 年前。

Image Portlet DIsplay all images in a folder using php

New Member 帖子: 12 加入日期: 12-12-26 最近的帖子
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....