chinagreenelvis Posted October 28, 2006 Share Posted October 28, 2006 I have the following urlhttp://www.chinagreenelvis.com/test/index.php?img=man.gifAs you can see, on the internet, it displays correctly. But when I have the same urlhttp://localhost/test/index.php?img=man.gifthe image does not display for me. All I get is an image placeholder. Does anyone have any idea why this happens? Quote Link to comment https://forums.phpfreaks.com/topic/25368-image-function-not-working-on-localhost/ Share on other sites More sharing options...
gmwebs Posted October 28, 2006 Share Posted October 28, 2006 It is most likely because the path to the image is wrong. Try taking out the leading / on your localhost. Also, it would help if you posted the code you are using. Quote Link to comment https://forums.phpfreaks.com/topic/25368-image-function-not-working-on-localhost/#findComment-115768 Share on other sites More sharing options...
chinagreenelvis Posted October 29, 2006 Author Share Posted October 29, 2006 The section of the page that contains the image has the following codesrc="/test/<?php echo $img; ?>"When I view the page source online I get the proper result:src="/test/man.gif"But when I view the page source from my localhost folder, I seesrc="/test/" Quote Link to comment https://forums.phpfreaks.com/topic/25368-image-function-not-working-on-localhost/#findComment-116471 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.