Jump to content

Recommended Posts

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

[code]
<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? -->
[/code]

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
the code as requested:

images.php
[code]
<?php
# 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
chdir("{$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.
readfile("{$Name}");
}
?>
[/code]

index.php
[code]
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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

<head>
<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" />
</head>

<body>
<img src="modules/images.php?f=an_image.gif" width="105" height="105" /><br />
</body>
</html>
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.