Click here to Skip to main content
15,892,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to echo an uploaded image into my html page.

What I have tried:

I've tried this code but it does not work see attached screen shots.

move to folder:
https://i.stack.imgur.com/M0UHP.jpg[^]

fetching image:
https://i.stack.imgur.com/loKD5.jpg[^]

output:
https://i.stack.imgur.com/fQ9Sb.jpg[^]
Posted
Updated 20-Sep-19 3:14am
Comments
Richard Deeming 20-Sep-19 9:08am    
Don't post screenshots of your code; post the relevant parts of your code as text. Then select the text and click the code button on the toolbar to format it properly.

1 solution

Your "move to folder" code adds an extra "." at the start of the filename.

For example, if the uploaded image name is my_cool_image.jpg, you will store it as .my_cool_image.jpg; your fetch code appears to be looking for the image without the leading ".", which is why it can't find it.
 
Share this answer
 
Comments
Ryan Catubay 23-Sep-19 1:38am    
Thank you for your answer it works!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900