ignace Posted October 29, 2006 Share Posted October 29, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/25493-calling-files-with-parameters-in-an-hrefsrc/ Share on other sites More sharing options...
kenrbnsn Posted October 29, 2006 Share Posted October 29, 2006 Please post the source of the image.php script. We nned to see that.Ken Quote Link to comment https://forums.phpfreaks.com/topic/25493-calling-files-with-parameters-in-an-hrefsrc/#findComment-116311 Share on other sites More sharing options...
ignace Posted October 29, 2006 Author Share Posted October 29, 2006 the code as requested:images.php[code]<?php# images.phpif (!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] Quote Link to comment https://forums.phpfreaks.com/topic/25493-calling-files-with-parameters-in-an-hrefsrc/#findComment-116325 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.