Jump to content

Image Link


user4fun
 Share

Recommended Posts

If you're including from inc/ then (it's not this simple, but for the purposes here) it's basically as if the include construct takes the contents of main_bar.inc, and outputs them in place of the include statement. So the paths should be relative to index.php, if that's not the case that may be the issue.You can also define exactly what the paths are relative to by using a <base> tag in the <head> of the document. You could also make the paths absolute by relating them to the root of the domain (e.g. for mysite.com the path "/images/img.png" always refers to mysite.com/images/img.png wherever that path is).

Link to comment
Share on other sites

Once the file is included, the directory you're in is relative to the file that included it.Therefore, using "images/happyimage.png" as the image URL should work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...