
Matt - 2006-09-05 21:06:54 -
In reply to message 1 from BC
You are misunderstanding how the thumbnail function works.
The image functions output binary data rather than anything that can be embedded into HTML, so you have to put your thumbnail script in another file (say, thumbnail.php for example). You can then "put" the image in the file by using the <img src="thumbnail.php"> call.
In your case, since you are iterating through a folder, I would suggest you change your script to look more like this:
<html>
<head>
...
</head>
<body>
...
<?
... iterate through all files and folders here.
echo "<img src='thumbnail.php?file=". $TheCurrentFile ."'>";
...
?>
</body>
</html>
Your Thumbnail.php file will then look like this:
<?php
$TheFile = $_GET["file"];
// thumbnail generation script here.
?>