Jump to content

[SOLVED] Path Ignored


Casalen

Recommended Posts

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>";
	}

Link to comment
https://forums.phpfreaks.com/topic/69529-solved-path-ignored/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.