<?PHP
// Original PHP code by Chirp Internet: [url]www.chirp.com.au[/url]
// Please acknowledge use of this code by including this header.
function getImages($dir)
{
global $imagetypes;
// array to hold return value What does retval mean?
$retval = array();
// add trailing slash if missing
if(substr($dir, -1) != "/") $dir .= "/";
// full server path to directory
$fulldir = "{$_SERVER['DOCUMENT_ROOT']}/$dir";
// $d ? what does this mean?
// @dir also?
//$entry ?
$d = @dir($fulldir) or die("getImages: Failed opening directory $dir for reading");
while(false !== ($entry = $d->read())) {
// skip hidden files
if($entry[0] == ".") continue;
// check for image files
if(in_array(mime_content_type("$fulldir$entry"), $imagetypes)) {
$retval[] = array(
"file" => "/$dir$entry",
"size" => getimagesize("$fulldir$entry")
);
}
}
$d->close();
return $retval;
}
?>
I am begining to understand php , but i am unsure just what words,phrases the language understands
for eg. above mime_content_type can you give me some guides please aswell
thanks for reading.