HERE is the gallery with screenshots. There are pictures with Chrome, Firefox, IE and phpdesigner. It seams that the one picture, that is not showed in IE is "png" format, other are "jpeg".
<?php
class DirSisu{
private $dirAdress;
private $aadress;
private $dir; //the exact address of the files dir
//Konstruktor
function __construct($kataloog){
$this -> dirAdress = getcwd();
$this -> dir = $this -> dirAdress.'/'.$kataloog;
$this -> aadress = scandir($this -> dir); //adds files names into an array
}
//Shows the filenames that are in the directory
function valjasta (){
for($i = 2; $i < count($this -> aadress); $i++){
echo $this -> aadress[$i]."<br />";
}
}
//Shows the pictures on the screen
function kuvaPildid(){
for($i = 2; $i < count($this -> aadress); $i++){
$a = $this -> dir.'/'.$this -> aadress[$i]; //The exact address of the picture
if(!is_dir ($a)){ //contorls if the file is not a folder
echo "<img src='$a' width='400' hspace='20' vspace='20' align='center' />";
}
}
}
}
$isend = new DirSisu('kataloog');
$isend -> valjasta();
$isend -> kuvaPildid();
?>


Sign In
Create Account

Back to top









