I a writing a gallery app in php. The images are dynamically displayed through php. On each load of the page, not all images are showing. it does this randomly, on each load.
I have not had this problem before, as I am new to php. My previous apps where all in perl, and I had no dynamic image display problems when using that language.
check it here: http://dev.system-engine.com/dev/exec/pcli.php?R=%27/Paintings%27&cfg=%22fgal%22
all help appreciated.
thank,
Jer A
here is some of the code:
function imageThumbLoad($ref) {
$path = FOTOGAL_PORT::$ROOT.$ref;
$path=preg_replace("/\'/","",$path);
$path=preg_replace("/\"/","",$path);
$path=preg_replace("/\*/"," ",$path);
$path=preg_replace("/\^/","&",$path);
$path=preg_replace("/\/([^\/]*)\/\.\./","",$path);
if(preg_match_all("/\.jpg|\.jpeg/",$path,$tmpmatches))
{
header("Content-type: image/jpeg");
$fh = fopen($path, 'r');
while (!feof($fh)) {
$l= fgets($fh, 4096);
print $l;
}
fclose($fh);
}