Trying to link to an image via PHP…
-
I’ve uploaded a number of images to a cloud service, and I moved them to NGG so I can just upload them to my WP installation as I go forward. I’m creating a profile system (linked above) that dynamically prints out the player’s image.
So the page I linked below should print this image:
src=”/wp-content/gallery/2018/henry_aaron.png”, which is how it shows in the backend of the NGG admin panel.
I use this code:
echo '<img src="/wp-content/gallery/20' . $line['grade'].'/'. strtolower($nFirst) . '_' . strtolower($nLast) .'.png">';
It’s not printing. It’s just printing a 20 x 20 placeholder, and when I inspect the element it says, 20 x 20 Role: presentation.
When I click on the link in the Inspect Element panel, it gives me a 404 error.
How can I link to an image directly so I can do so dynamically?
Thank you.
The page I need help with: [log in to see the link]
- The topic ‘Trying to link to an image via PHP…’ is closed to new replies.