Thank you!
Not QUITE the first; I have used snippets and small routines for a while; however I did not know how to do this in php.

Turns out there are at least 2 methods: glob, and an iteration of the directory with readdir() to build up an array, then one by one print the elements in the array. In python this is not hard. Iteration in python is somewhat different- not to mention getting used to do blocks. Being so used to snake charming, learning a new way means getting used to different procedures.

On 4/8/2012 2:18 AM, tamouse mailing lists wrote:
On Sat, Apr 7, 2012 at 10:35 PM, Kirk Bailey<kbai...@howlermonkey.net>  wrote:
<html>
<head>
<title>Image inventory of this directory</title>
<style TYPE="text/css">
body { margin-left: 10; margin-right: 10%; }
body {background-attachment:fixed;}
A:link, A:visited,  A:active { text-decoration:none; }
A:hover { text-decoration:underline; }
.justify{text-align:justify;}
.center{text-align:center;}
</style>
</head>
<body bgcolor="#A0A0A0" TEXT="BLACK" LINKS="BLUE">
<CENTER>This page inventories the contents of this directory and lists all
image files in order- as
the computer determines such matters. Here is the full inventory.
<hr align="center">
<P>
<?php
foreach (glob("*.*") as $filename) {
    echo '<img src="'.$filename.'">'."<br>\n$filename\n<P>\n";
}
?>
</body></html>


This works nicely. copied code from online manual, chainsaw editing to fit,
superglue in the spare parts needed and it lists them all and composes
proper img links to display on the inventory page. NOW I have the tool i
needed; can someone else put this to good work?
Well, congrats on a first somewhat useful program. All I have to say
now is: you have a long way to go.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to