'php get image from root directory of local server
Hey so I have an image url in css for a Wordpress theme which I can't use because it points to an online vault I don't have access to. However I have the image stored locally on my local server. So how do I use php to load it ? I need to load it in such a way that anyone opening their site on their local server whatever software they use for that, the image will open, so no manually entering the path because different software for local server might have a different path. I need to get it through a php function like get_template_directory_uri()
or some other way to get the root directory wherever it is, so how do I do that? Can I do that in css? Because the image is loaded through the css background-image:url() thing.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
