Search code examples
phpurlimagesrc

When I generate the src of an img tag, using php, it strips the forward slash at the end of the tag. Anyone come across this before?


If I have the path to an image stored in $thumbPath and I put that as the img tag's src it strips the end "/" from the tag. Does anyone have any ideas about this?

<img src="<?php echo $thumbPath; ?>" /> 
// <img src="path/to/file/foo.jpg"> 

Thanks


Solution

  • It seems very unlikely that this is the location of the problem. "echo" is not semantically aware. It's much more likely that the error exists in whatever code is generating $thumbPath.