I'm stuck and I was hoping somebody here could help me.
I want to create a link to a file in a php script (the file is actually an image, a .tif image). I have Google d this relentlessly, to no avail.
The firewall is blocking external connections but I am running this query on a machine that mimics an internal connection. I currently use this machine to allow external user to run queries that hit the internal database so I know this works…
For instance this part works just fine:
$result = pg_query($conn, $query);
while($row=pg_fetch_assoc($result))
{
echo "<p>image details:<br />image: <u>" . $row['field'] . "</u> image date: <u>" . $row['field'] . "</u> image path: <u>" . $row['filename'] . "</u></p>";
The part of the query that I want to turn into a link is the $row[‘filename’], which is returned as
//host\path\path\path\path\path\path\path.TIF
… but now I want access to certain files associated with those queries. I want to turn this filename into a url that, when put into a link, goes to this file and opens it:
$imageURL = $row['filename'];
echo "<p>Using imageURL: <a href='$imageURL' border='0' target='_blank'>Click Here</a></p>";
Maybe this isn't possible. I just can't seem to figure out how to fetch the image.
I do not have imagemagick or imagick and I don't want to go that route. Thanks in advance for any help.
EDIT
The machine I am running the query on is http://webapps.example.com
The machine I am querying (where the image resides) is not - the image path I am trying to return (as a link) is //hostipaddress\path\path\path\path\path\path\filename.TIF