Answer the question
In order to leave comments, you need to log in
Work images from any directory of the site?
I have a file index.php
and others by type header.php
footer.php
and I need the images specified in to header.php
footer.php
work and in index.php
(these are different folders, there is a folder with articles and categories) tried through ../
and /
, ./
does it work, is there any php property that specifies any folder as root
Answer the question
In order to leave comments, you need to log in
What does "images worked" mean? If we are talking about the fact that they should be loaded in the browser, then they should lie inside the root directory that the web server serves. And the path must be absolute , starting from this directory.
PHP has absolutely nothing to do with it.
Define your root variable in index.php and then write all paths (anywhere) relative to it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question