Casalen Posted September 16, 2007 Share Posted September 16, 2007 I'm working on creating a gallery script. It calls up a database file and finds out what thumbnail to use in selecting a gallery, then displays it. The thumbnails should be kept in gallery/gal_th/image.jpg. They aren't showing. First I had this: echo "<td><img src=\"./gal_th/$gal_arr[0]\"> Then: $gal_th = "./gal_th/" . $gal_arr[0]; echo "<td><img src=\"$gal_th\"> Then: echo "<td><img src=\"./gal_th/people.jpg"> Then: echo "<td><img src=\"http://www.kgpnet.net/kgpphoto2/gallery/gal_th/people.jpg\"> So, I think I've used every way to call the image I can. In each I case I checked properties on the image; the script is finding the image name, but is ignoring the directory gal_th. Even when I put the absolute path it was ignored, as though I had only put the filename. Any ideas why? Here's the script up to that point: //First, let's get the options. include './db/settings.db'; //In case there are rows, we offset to check which will be new, not the end //This tells us we haven't done anything yet. $set = 1; //First, we need to choose a gallery. Let's find the data: $gal_file = file("./db/gals.db"); //Now we list in sets, names without descriptions, depending on settings. if($mode == "grid"){ foreach($gal_file as $gal_line){ $gal_arr = explode("|",$gal_line); $gal_th = "./gal_th/" . $gal_arr[0]; if($set == "1"){ echo "<table><cellspaceing=\"6\"><tr><td><img src=\"http://www.kgpnet.net/kgpphoto2/gallery/gal_th/people.jpg\"> <br> $gal_arr[1]</td>"; } Quote Link to comment https://forums.phpfreaks.com/topic/69529-solved-path-ignored/ 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.