Hello all,
I’m quite new to PHP but I don’t think this is a newbie error… apologies if it is, though! I have two HTML pages (addresses as follows) which call a third page, display.php (code follows). In the error log, I’m periodically getting the following error.
It doesn’t happen all the time; I’ve tested every link available and I’ve once generated it myself but couldn’t repeat it. Clearly the problem is that the path newphotos/.jpg doesn’t exist - but I can’t see how it can ever be passed to getimagesize as a parameter! Any help to solve the problem or how I could trace it would be appreciated!
Thanks.
Stuart.
Error:
[07-May-2013 08:37:48 UTC] PHP Warning: getimagesize(newphotos/.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/lavenham/public_html/airfield/display.php on line 75
HTML pages:
www.lavenham.co.uk/airfield/
www.lavenham.co.uk/airfield/fieldmap.htm
Code from display.php page:
[php]
<?php
$ref=$_GET['ref'];
//Set up array of captions
$pictures=array(
array( caption=>"An enlisted men's ablution hut",
file=>"a"),
array( caption=>"The remains of a shower block",
file=>"b"),
array( caption=>"The track to Sites 5, 6 & 7, looking South",
file=>"c"),
array( caption=>"The track to Sites 5, 6 & 7, looking South",
file=>"d"),
array( caption=>"Road to North of Site 5",
file=>"e"),
array( caption=>"Pumphouse, Site 5",
file=>"f"),
array( caption=>"Burma Road, towards Lavenham",
file=>"g"),
array( caption=>"Burma Road, towards Airfield",
file=>"h"),
array( caption=>"Gymnasium, Site 2",
file=>"i"),
array( caption=>"Squadron Offices, Technical Site",
file=>"j"),
array( caption=>"North side of Bomb Stores",
file=>"k"),
array( caption=>"Runway 2, looking NE",
file=>"l"),
array( caption=>"Runway 3",
file=>"m"),
array( caption=>"South, from SE end of Runway 3",
file=>"n"),
array( caption=>"The Control Tower (currently being restored)",
file=>"o"),
array( caption=>"Memorial plaque in Lavenham Market Place",
file=>"p"));
?>
<?php print $pictures[$ref][caption]; ?>
[/php]