Jump to content


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


calling files with parameters in an href/src

Recommended Posts

i have been working with asp, and now am i trying to do something what i thought was possible!

<img src="image.php?f=an_image.gif" width="105" height="105" />
<!-- however when i load the page no image is being displayed, does anyone know what i did wrong? or what i am forgetting? -->

thx in advance, i'm still looking into the problem so it might be that i'll find it in my next google search, but i appreciate any help :D

Share this post

Link to post
Share on other sites
Please post the source of the image.php script. We nned to see that.


Share this post

Link to post
Share on other sites
the code as requested:

# images.php
if (!function_exists("getMediaType"))
include "../components/functions.php";

# declare/initialise variables
$Img    = $_REQUEST['f'];
$Folder = "../media/images/";
$Ext    = explode(".", $Img);
$MT     = getMediaType(array_pop($Ext));

if ($MT <> "")
# change to the correct folder

# submit header information
//header("content-type: image/{$MT}");
//header("content-disposition: attachment; filename={$Name}");

# read the file to assure the file and his content is being submitted.

<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<!-- W3C XHTML 1.0 Strict Standard Template -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">

<title>laboratory :: sticking needles up php's ass</title>
<meta http-equiv="robots" content="noindex,nofollow" />
<meta http-equiv="pragma" content="nocache" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<meta http-equiv="content-style-type" content="text/css" />

<img src="modules/images.php?f=an_image.gif" width="105" height="105" /><br />

Share this post

Link to post
Share on other sites


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.