I got something like this: print '<img src="'.$rlink.'">';
it shows me right link, but image doesn't appear. When I go to browser console, I get this error: http://somesite.com/somesite.com/thisimage.jpg I tried <img src="<? php echo $rlink; ?>"/>
It is not working. I was looking around forums but didn't found a solution. Thank you for any help!
I'm guessing your variable $rlink
contains somesite.com/thisimage.jpg
. Since it doesn't have a protocol at the beginning, the browser thinks it's a relative path, thus trying to go to somesite.com
folder, which doesn't exist. You can either put http://
at the beginning of the src
, or remove domain so it's treated like the relative path it is as of now
<img src="<? php echo $rlink; ?>"/>
needs to be:
<img src="<?php echo $rlink ?>">
it might not solve the problem because i dont kno what the value of the variable is. It might be wrong.