The image path requires a single or double forward slash and I have no control over when

I am currently programming PHP on a server. But when uploading images to my webspace and showing them I sometimes need

 myaddress.com//image.jpg 

      

and sometimes

 myaddress.com/image.jpg 

      

It seems to switch from time to time. Why is this and how can I fix it? I have two pages that are loaded with ajax directly when they are selected in the navigation bar. And when I use // it works on one of the pages and when I use single / it works on the other. Why?

Thanks in advance!

+3


source to share


1 answer


Use only one forward slash. Try to enter the full path to the file and / or domain with the protocol ( http://myaddress.com/image.jpg )



0


source







All Articles