John Magnolia
John Magnolia

Reputation: 16793

PHP Real path always returning false

I have a problem with the PHP realpath always returning false how ever I pass the file path string.

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

What could be causing this to break?

Upvotes: 5

Views: 11219

Answers (1)

jasonbar
jasonbar

Reputation: 13461

Are you sure you have the correct path? It probably doesn't start with /shop in the filesystem.

Are your permissions correct?

realpath() requires:

  1. That the file / path actually exist.
  2. Read permission for the entire directory hierarchy.

realpath() doesn't work with URLs.

Upvotes: 11

Related Questions