This works for all my linked paths, aka fetch this document from
XMLHTTPRequest from server root + Whatever trailing URL, it has
unfortunately been tripping up all my image requests for the last
week or something. It’s blatantly obvious, I’m just not seeing it.
As long as I’m on this scriptlet I might as well ask too, with my
desired extension, how would I place a -m before it to only search
images that would be something like
-m.jpg||gif||png? $fileChunks = explode(“-m”,”.”, $file);
Anyway, code here, and screw you godaddy.
[code]
$hds=”images/products/sound/”; //ignore this
$src=”images/products/sound/spkr/”;
$url=”layers/sound/pcons/”; //ignore this
$noimg=”images/”; //ignore this
$desired_extension = ‘png’||’jpg’||’gif’;
$dirname = ($_SERVER[‘DOCUMENT_ROOT’] . ‘/’ . $src);
$dir = opendir($dirname);
echo ‘<div style=”visibility:hidden;”>’;
while(false != ($file = readdir($dir)))
{
if(($file != “.”) and ($file != “..”))
{
$fileChunks = explode(“.”, $file);
if($fileChunks[1] == $desired_extension)
{
echo ‘<img src=”‘.$dirname.”.$file.'” />’;
}
}
}
closedir($dir);
echo ‘</div>’;