Reaper0167 Posted March 4, 2009 Share Posted March 4, 2009 Picture not displaying, little red x instead. Thought I had this one, guess not. <?php $imgRealPath = "userimages/"; foreach(glob("$imgRealPath/{*.jpg,*.png,*.gif}", GLOB_BRACE) as $fname) { echo '<img src=\"" . $imgWebPath . "/" . baseName($fname) . "\" width="150" border="1"><br/><br/>'; } ?> Quote Link to comment Share on other sites More sharing options...
WolfRage Posted March 4, 2009 Share Posted March 4, 2009 What does the final output look like? Quote Link to comment Share on other sites More sharing options...
Reaper0167 Posted March 4, 2009 Author Share Posted March 4, 2009 proper size border for the picture, and also has the proper spacing between the borders, but no pictures, just a little red x in the upper corner of the border Quote Link to comment Share on other sites More sharing options...
WolfRage Posted March 4, 2009 Share Posted March 4, 2009 What I meant was what was the code output. The problem is your use of double and single qoutes. You can see the error in the way the code is highlighted. <?php echo '<img src=\"" . $imgWebPath . "/" . baseName($fname) . "\" width="150" border="1"><br/><br/>'; ?> Should be: <?php echo '<img src="' . $imgWebPath . '/' . baseName($fname) . '" width="150" border="1"><br/><br/>'; ?> Quote Link to comment Share on other sites More sharing options...
Reaper0167 Posted March 4, 2009 Author Share Posted March 4, 2009 thanks for the help,, but still no images. Quote Link to comment Share on other sites More sharing options...
WolfRage Posted March 4, 2009 Share Posted March 4, 2009 OK. Sorry with out the rest of the code and seeing what the output is it is hard to troubleshoot beyond that. Good luck though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.