levi levi - 1 year ago 47
PHP Question

Get 2 levels up from dirname( __FILE__)

How can I return the pathname from the current file, only 2 directories up?

So if I my current file URL is returning


How can I return "theme/"

Currently I am using

return dirname(__FILE__)

return dirname(dirname(__FILE__));

Should return 2 directories up for the current file.