PHP Real path always returns false

I have a problem with implementing a PHP file that always returns false as soon as I pass the file path string.

By default, I pass this realpath()"/shop/templates/default/css/reset.css", I also tried:

What could be the reason for this?

+2
source share
1 answer

Are you sure you have the right path? This probably does not start with / shop on the file system.

Are your permissions correct?

realpath () requires:

  • In fact, the file / path exists.
  • Allow reading for the entire directory hierarchy.

realpath () does not work with urls.

+7
source

Source: https://habr.com/ru/post/1661685/


All Articles