HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/ACFrame/filelistX.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />

</head>



<?php

if ($handle = opendir('./DBinput')) {
    echo "Directory handle: $handle\n";
    echo "<br>";

    /* This is the correct way to loop over the directory. */
    while (false !== ($entry = readdir($handle))) {
        echo "";
		$pos = strpos($entry,".psd");
		$post = strpos($entry,".tif");
		$posa = strpos($entry,".ai");
		if($pos>0) { 
		//echo "do psd";
				?>
		<a href='Pinputt.php?img=<?php echo $entry;?>'><img src='./DBinput/<?php echo $entry;?>' WIDTH=100 alt='<?php echo $entry;?>'>
		<?php
		
		}
		elseif($post>0) { 
		//echo "do psd";
				?>
		<a href='Pinputt.php?img=<?php echo $entry;?>'><img src='./DBinput/<?php echo $entry;?>' WIDTH=100 alt='<?php echo $entry;?>'>
		<?php
		
		}
		elseif($posa>0) { 
		//echo "do psd";
				?>
		<a href='Pinputt.php?img=<?php echo $entry;?>'><img src='./DBinput/<?php echo $entry;?>' WIDTH=100 alt='<?php echo $entry;?>'>
		<?php
		
		}
		else{
		?>
		<a href='dhtmlTT2.php?tmpt=<?php echo $entry;?>'><img src='./DBinput/<?php echo $entry;?>' WIDTH=150 alt='<?php echo $entry;?>'>
		<?php
    }}

    /* This is the WRONG way to loop over the directory. */


    closedir($handle);
}




?>
</html>