Menu
Hi I am trying to display all the images in a certain folder.
I dont want to display the directory itself of the parent directory.
I would like to show the actual photos instead of the links also.
Here is the code:
[code=php]<?php
session_start();
?><!doctype html public “-//W3C//DTD HTML 4.0 //EN”>
<html>
<head>
<title>Easy display</title>
</head>
<body>
<?php
$dirname = “./imagesFolder/user${_SESSION[‘user’]}/”;
$images = scandir($dirname);
foreach($images as $curimg){
echo “<a href=’./imagesFolder/user${_SESSION[‘user’]}/$curimg’>$curimg</a><br>n”;
};
?>
</body>
</html>
Any suggestions?
Thanks in advance!