After I Googled through, I later settled to save the path to an uploaded picture in the database and put the picture in a folder above the public folder (www). However, doing this was easy, whenever i wish to show the picture, i just get the picture ID, locate it in the database and extract the path from there, i then echo it. The problem i have is that the picture did not show and if i go through my cpanel, i see the picture there. the path is correct, i used to md5(the_path) before saving it. I checked through and i did not see anything wrong but yet the picture does not show via my php echo. I echoed the path and check with the one in the cpanel folder and evertything ok. The picture path is above the www. Any assistance on this will be appreciated before i grow grey hair. Thanks everyone
3 replies to this topic
#1
Posted 11 August 2011 - 05:29 AM
|
|
|
#2
Posted 11 August 2011 - 05:38 AM
Can you post the url of this image, so we can take a look?
#3
Posted 21 August 2011 - 04:37 PM
Can you please provide us with the code?
#4
Posted 01 September 2011 - 12:16 PM
Are you using the appropriate version of
Also I seem to remember a special function for echoing images.
header('Type: image/png');
with your image?Also I seem to remember a special function for echoing images.
imagepng($final);That is for pngs but I'm sure there are variants also you can use:
$final = imagecreatefrompng("path to image from computer root!");
to fetch the image in the first place (it might even transform it for you!).
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









